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

Commit

Permalink
fix: typo (#3946)
Browse files Browse the repository at this point in the history
`ipfs.allAll` should be `ipfs.addAll`
  • Loading branch information
Alan Shaw authored Nov 22, 2021
1 parent 041fc29 commit 70c67e2
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 70c67e2

Please sign in to comment.