Skip to content

Commit 492860a

Browse files
authored
Merge pull request #1130 from solid/fix/streaming-start-end
Always pass an object as options.
2 parents 70ddc02 + 6e063ea commit 492860a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ldp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ class LDP {
373373
try {
374374
releaseLock = await lock(path, { retries: 10 })
375375
return await new Promise((resolve, reject) => {
376-
const stream = fs.createReadStream(path, start && end && {start, end})
376+
const stream = fs.createReadStream(path, start && end ? {start, end} : {})
377377
stream
378378
.on('error', function (err) {
379379
debug.handlers(`GET -- error reading ${path}: ${err.message}`)

0 commit comments

Comments
 (0)