remove spread syntax

This commit is contained in:
anders
2019-09-10 14:50:07 -05:00
parent 85d709a957
commit 7d8d6104bc

View File

@@ -3,13 +3,14 @@ const io = require('orbit-db-io')
// Creates a DB manifest file and saves it in IPFS
const createDBManifest = async (ipfs, name, type, accessControllerAddress, options) => {
const manifest = {
const manifest = Object.assign({
name: name,
type: type,
accessController: path.join('/ipfs', accessControllerAddress),
// meta field is only added to manifest if options.meta is defined
...(options.meta !== undefined ? { meta: options.meta } : {})
}
accessController: path.join('/ipfs', accessControllerAddress)
},
// meta field is only added to manifest if options.meta is defined
options.meta !== undefined ? { meta: options.meta } : {}
)
return io.write(ipfs, options.format || 'dag-cbor', manifest, options)
}