@nxtedition/lib 19.5.1 → 19.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/deepstream.js +7 -2
  2. package/package.json +1 -1
package/deepstream.js CHANGED
@@ -169,10 +169,15 @@ function query(ds, designId, params, state = ds.record.PROVIDER) {
169
169
  if (finished) {
170
170
  return rxjs.of({ rows: nextRows })
171
171
  } else {
172
- const last = rows.pop()
172
+ let nextKey = rows.pop().key
173
173
  // assert(last.key)
174
174
  // assert(rows.length > 0)
175
- return next(last.key, nextRows, limit - rows.length)
175
+ if (nextKey === startkey) {
176
+ // TODO (fix): We need to use startkey_docid to properly handle this...
177
+ // See, https://docs.couchdb.org/en/stable/ddocs/views/pagination.html#paging-alternate-method
178
+ nextKey += '\u0000'
179
+ }
180
+ return next(nextKey, nextRows, limit - rows.length)
176
181
  }
177
182
  }),
178
183
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "19.5.1",
3
+ "version": "19.5.2",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",