From aa49616fa1dcbe2daf4decf5a132086d8700d5ef Mon Sep 17 00:00:00 2001 From: cckelly21 Date: Wed, 19 Dec 2018 17:10:01 -0500 Subject: [PATCH] fix(add.js): fix paths as string causing unncessary add --- add.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/add.js b/add.js index 432de7c..4d7e69b 100644 --- a/add.js +++ b/add.js @@ -36,9 +36,18 @@ async function add(opts) { } const { - did, paths, password, force, keyringOpts + keyringOpts, + password, + force, + did } = opts + let { paths } = opts + + if ('string' === typeof opts.paths) { + paths = [ opts.paths ] + } + let afs try { ({ afs } = await create({ did, password, keyringOpts }))