From 2f7afb68ac226e4af09b994f550284740f0db218 Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Mon, 22 Nov 2021 11:30:41 +0000 Subject: [PATCH] fix: typo My guess is that `ipfs.allAll` should be `ipfs.addAll` --- .../src/files/normalise-candidate-multiple.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ipfs-core-utils/src/files/normalise-candidate-multiple.js b/packages/ipfs-core-utils/src/files/normalise-candidate-multiple.js index 4ba85ee23d..a57a61da28 100644 --- a/packages/ipfs-core-utils/src/files/normalise-candidate-multiple.js +++ b/packages/ipfs-core-utils/src/files/normalise-candidate-multiple.js @@ -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 @@ -60,7 +60,7 @@ export async function * normaliseCandidateMultiple (input, normaliseContent) { // (Async)Iterable // (Async)Iterable 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 @@ -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')