git ssb

10+

Matt McKegg / patchwork



Commit 9710afb151f45ddca6870ec5164925f09f11ce42

fix next-stepper end of feed handling

Matt McKegg committed on 6/21/2017, 4:21:22 AM
Parent: 108a00eb63bf7bfda43f806844ae46bbc750fd35

Files changed

lib/next-stepper.jschanged
package.jsonchanged
lib/next-stepper.jsView
@@ -1,6 +1,7 @@
11 const pull = require('pull-stream')
22 const Next = require('pull-next')
3 +var ENDED = {}
34
45 module.exports = nextStepper
56
67 // TODO - this should be another module?
@@ -14,9 +15,9 @@
1415 return Next(function () {
1516 if (last) {
1617 if (count === 0) return
1718 var value = opts[range] = last
18- if (value == null) return
19 + if (value === ENDED) return
1920 last = null
2021 }
2122 return pull(
2223 createStream(clone(opts)),
@@ -31,9 +32,9 @@
3132 count = -1
3233 return count
3334 }
3435 // end stream if there were no results
35- if (last == null) last = {}
36 + if (last == null) last = ENDED
3637 })
3738 )
3839 })
3940 }
package.jsonView
@@ -31,9 +31,9 @@
3131 "moment": "^2.18.1",
3232 "mutant": "^3.21.0",
3333 "mutant-pull-reduce": "^1.1.0",
3434 "obv": "0.0.1",
35- "patchcore": "~1.5.3",
35 + "patchcore": "~1.5.4",
3636 "pull-abortable": "^4.1.0",
3737 "pull-defer": "^0.2.2",
3838 "pull-file": "~1.0.0",
3939 "pull-identify-filetype": "^1.1.0",

Built with git-ssb-web