Skip to content

Commit f1bdbaf

Browse files
authored
fix: add default args for ipfs.add (#2950)
So we don't send invalid args over http.
1 parent 0e8294e commit f1bdbaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/to-url-search-params.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const mtimeToObject = require('./mtime-to-object')
66
module.exports = (args, options) => {
77
const searchParams = new URLSearchParams(options)
88

9-
if (args === undefined) {
9+
if (args === undefined || args === null) {
1010
args = []
1111
} else if (!Array.isArray(args)) {
1212
args = [args]

0 commit comments

Comments
 (0)