Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] Properly parse updateSeq.

  • Loading branch information...
commit 91e17be73edc0f2d99737f997ec83b34e7c5ffe6 1 parent 2d681c9
@indexzero authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/changes.js
View
4 lib/changes.js
@@ -97,7 +97,7 @@ Changes.prototype.listen = function (updateSeq, callback) {
try {
row = JSON.parse(piece);
if (!row) return;
- updateSeq = row.last_seq || row.seq;
+ updateSeq = row.last_seq || row.seq || updateSeq;
}
catch (e) {
// ignore this line, it will be removed at end
@@ -228,7 +228,7 @@ Changes.prototype.query = function (callback) {
// Set the updateSeq. The last query returned
// will win the race and ensure the latest value.
//
- updateSeq = body.update_seq || updateSeq || 0;
+ updateSeq = json.update_seq || updateSeq || 0;
//
// Emit the rows found when querying the view.
Please sign in to comment.
Something went wrong with that request. Please try again.