Commit 9710afb151f45ddca6870ec5164925f09f11ce42
fix next-stepper end of feed handling
Matt McKegg committed on 6/21/2017, 4:21:22 AMParent: 108a00eb63bf7bfda43f806844ae46bbc750fd35
Files changed
lib/next-stepper.js | changed |
package.json | changed |
lib/next-stepper.js | ||
---|---|---|
@@ -1,6 +1,7 @@ | ||
1 | 1 … | const pull = require('pull-stream') |
2 | 2 … | const Next = require('pull-next') |
3 … | +var ENDED = {} | |
3 | 4 … | |
4 | 5 … | module.exports = nextStepper |
5 | 6 … | |
6 | 7 … | // TODO - this should be another module? |
@@ -14,9 +15,9 @@ | ||
14 | 15 … | return Next(function () { |
15 | 16 … | if (last) { |
16 | 17 … | if (count === 0) return |
17 | 18 … | var value = opts[range] = last |
18 | - if (value == null) return | |
19 … | + if (value === ENDED) return | |
19 | 20 … | last = null |
20 | 21 … | } |
21 | 22 … | return pull( |
22 | 23 … | createStream(clone(opts)), |
@@ -31,9 +32,9 @@ | ||
31 | 32 … | count = -1 |
32 | 33 … | return count |
33 | 34 … | } |
34 | 35 … | // end stream if there were no results |
35 | - if (last == null) last = {} | |
36 … | + if (last == null) last = ENDED | |
36 | 37 … | }) |
37 | 38 … | ) |
38 | 39 … | }) |
39 | 40 … | } |
package.json | |||
---|---|---|---|
@@ -31,9 +31,9 @@ | |||
31 | 31 … | "moment": "^2.18.1", | |
32 | 32 … | "mutant": "^3.21.0", | |
33 | 33 … | "mutant-pull-reduce": "^1.1.0", | |
34 | 34 … | "obv": "0.0.1", | |
35 | - "patchcore": "~1.5.3", | ||
35 … | + "patchcore": "~1.5.4", | ||
36 | 36 … | "pull-abortable": "^4.1.0", | |
37 | 37 … | "pull-defer": "^0.2.2", | |
38 | 38 … | "pull-file": "~1.0.0", | |
39 | 39 … | "pull-identify-filetype": "^1.1.0", |
Built with git-ssb-web