Skip to content

Commit 62175b8

Browse files
author
Benjamin Forster
committed
Merge branch 'pass-db' of git://github.com/Frando/hyper-graph-db into Frando-pass-db
2 parents ac61d77 + da752a1 commit 62175b8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ const PassThrough = stream.PassThrough
2020
function Graph (storage, key, opts) {
2121
if (!(this instanceof Graph)) return new Graph(storage, key, opts)
2222
events.EventEmitter.call(this)
23-
2423
if (typeof key === 'string') key = Buffer.from(key, 'hex')
2524

2625
if (!Buffer.isBuffer(key) && !opts) {
2726
opts = key
2827
key = null
2928
}
3029

31-
if (!opts) opts = {}
30+
opts = opts || {}
3231
this.db = hyperdb(storage, key, opts)
3332
this._prefixes = Object.assign({}, opts.prefixes || constants.DEFAULT_PREFIXES)
3433
this._basename = opts.name || constants.DEFAULT_BASE

0 commit comments

Comments
 (0)