Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: regression on files.add and update deps (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias authored Mar 9, 2018
1 parent 1f4eec4 commit 85cc2a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
"big.js": "^5.0.3",
"bs58": "^4.0.1",
"cids": "~0.5.2",
"concat-stream": "^1.6.0",
"concat-stream": "^1.6.1",
"detect-node": "^2.0.3",
"flatmap": "0.0.3",
"glob": "^7.1.2",
"ipfs-block": "~0.6.1",
"ipfs-unixfs": "~0.1.14",
"ipld-dag-pb": "~0.13.0",
"ipld-dag-pb": "~0.13.1",
"is-ipfs": "^0.3.2",
"is-stream": "^1.1.0",
"lru-cache": "^4.1.1",
"lru-cache": "^4.1.2",
"multiaddr": "^3.0.2",
"multihashes": "~0.4.13",
"ndjson": "^1.5.0",
Expand All @@ -47,10 +47,10 @@
"peer-info": "~0.11.6",
"promisify-es6": "^1.0.3",
"pull-defer": "^0.2.2",
"pull-pushable": "^2.1.2",
"pull-pushable": "^2.2.0",
"pump": "^3.0.0",
"qs": "^6.5.1",
"readable-stream": "^2.3.4",
"readable-stream": "^2.3.5",
"stream-http": "^2.8.0",
"stream-to-pull-stream": "^1.7.2",
"streamifier": "^0.1.1",
Expand All @@ -65,17 +65,17 @@
"url": "https://github.com/ipfs/js-ipfs-api"
},
"devDependencies": {
"aegir": "^13.0.0",
"aegir": "^13.0.6",
"chai": "^4.1.2",
"cross-env": "^5.1.3",
"dirty-chai": "^2.0.1",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-react": "^7.7.0",
"go-ipfs-dep": "^0.4.13",
"gulp": "^3.9.1",
"hapi": "^17.2.0",
"interface-ipfs-core": "~0.51.0",
"hapi": "^17.2.2",
"interface-ipfs-core": "~0.55.1",
"ipfs": "~0.28.0",
"ipfsd-ctl": "~0.29.0",
"ipfsd-ctl": "~0.29.1",
"pre-commit": "^1.2.2",
"socket.io": "^2.0.4",
"socket.io-client": "^2.0.4",
Expand Down
5 changes: 3 additions & 2 deletions src/files/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ module.exports = (send) => {
const ok = Buffer.isBuffer(_files) ||
isStream.readable(_files) ||
Array.isArray(_files) ||
OtherBuffer.isBuffer(_files)
OtherBuffer.isBuffer(_files) ||
typeof _files === 'object'

if (!ok) {
return callback(new Error('"files" must be a buffer, readable stream, or array of objects'))
return callback(new Error('first arg must be a buffer, readable stream, an object or array of objects'))
}

const files = [].concat(_files)
Expand Down

0 comments on commit 85cc2a8

Please sign in to comment.