mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-03 03:23:45 +08:00
[local-sync] Increment streamAll offset by chunkSize (#5)
Otherwise we'll infinite loop if there are more than 2000 results.
This commit is contained in:
parent
60bca4acb2
commit
f32d0df7e0
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ Sequelize.Model.prototype.streamAll = function streamAll(options = {}) {
|
|||
this.findAll(opts).then((models = []) => {
|
||||
observer.onNext(models)
|
||||
if (models.length === chunkSize) {
|
||||
opts.offset = chunkSize;
|
||||
opts.offset += chunkSize;
|
||||
findFn(opts)
|
||||
} else {
|
||||
observer.onCompleted()
|
||||
|
|
Loading…
Reference in a new issue