Skip to content

Commit aac24db

Browse files
committed
nodejs-bwt-daemon: Delete nully options so that they get their default value
1 parent 1a62dad commit aac24db

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

contrib/nodejs-bwt-daemon/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ function init(options) {
5454
delete options.http
5555
}
5656

57+
// Delete nully options so that they get their default value
58+
Object.entries(options)
59+
.filter(([ _, val ]) => val == null)
60+
.forEach(([ key, _ ]) => delete options[key])
61+
5762
if (!options.electrum_addr && !options.http_addr) {
5863
throw new Error('None of the bwt services are enabled')
5964
}

0 commit comments

Comments
 (0)