Skip to content

Early abort when events were fetched without limit#81

Closed
johanneslumpe wants to merge 1 commit intothenativeweb:masterfrom
johanneslumpe:patch-1
Closed

Early abort when events were fetched without limit#81
johanneslumpe wants to merge 1 commit intothenativeweb:masterfrom
johanneslumpe:patch-1

Conversation

@johanneslumpe
Copy link
Copy Markdown

When using MongoDB as backend and calling es.getEvents((err, events) => { ... }), any call to events.next will result in an error, as the current logic adds the default -1 limit to the skip value of 0, resulting in an invalid negative skip value. Invoking the callback in this case with an empty array should be a graceful fix.

When using MongoDB as backend and calling `es.getEvents((err, events) => { ... })`, any call to `events.next` will result in an error, as the current logic adds the default `-1` limit to the `skip` value of `0`, resulting in an invalid negative skip value. Invoking the callback in this case with an empty array should be a graceful fix.
@adrai
Copy link
Copy Markdown
Contributor

adrai commented Sep 12, 2016

thanks for the advice... solved it with v1.8.1

@adrai adrai closed this Sep 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants