Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: typo #3946

Merged
merged 1 commit into from
Nov 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: typo
My guess is that `ipfs.allAll` should be `ipfs.addAll`
  • Loading branch information
Alan Shaw authored Nov 22, 2021
commit 2f7afb68ac226e4af09b994f550284740f0db218
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function * normaliseCandidateMultiple (input, normaliseContent) {
// fs.ReadStream
// @ts-expect-error _readableState is a property of a node fs.ReadStream
if (typeof input === 'string' || input instanceof String || isBytes(input) || isBlob(input) || input._readableState) {
throw errCode(new Error('Unexpected input: single item passed - if you are using ipfs.allAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT')
throw errCode(new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT')
}

// Browser ReadableStream
Expand Down Expand Up @@ -60,7 +60,7 @@ export async function * normaliseCandidateMultiple (input, normaliseContent) {
// (Async)Iterable<Number>
// (Async)Iterable<Bytes>
if (Number.isInteger(value)) {
throw errCode(new Error('Unexpected input: single item passed - if you are using ipfs.allAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT')
throw errCode(new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT')
}

// (Async)Iterable<fs.ReadStream>
Expand Down Expand Up @@ -89,7 +89,7 @@ export async function * normaliseCandidateMultiple (input, normaliseContent) {
// Note: Detected _after_ (Async)Iterable<?> because Node.js fs.ReadStreams have a
// `path` property that passes this check.
if (isFileObject(input)) {
throw errCode(new Error('Unexpected input: single item passed - if you are using ipfs.allAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT')
throw errCode(new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT')
}

throw errCode(new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT')
Expand Down