This commit is contained in:
2017-06-24 11:32:04 -07:00
parent 8735b23bf9
commit 1d21facd2c
4 changed files with 61 additions and 5 deletions

View File

@ -441,6 +441,7 @@ EventStoreNodeConnection.prototype.subscribeToStreamFrom = function(
userCredentials, readBatchSize
) {
if (typeof stream !== 'string' || stream === '') throw new TypeError("stream must be a non-empty string.");
if (lastCheckpoint !== null && typeof lastCheckpoint !== 'number') throw new TypeError("lastCheckpoint must be a number or null.");
if (typeof eventAppeared !== 'function') throw new TypeError("eventAppeared must be a function.");
var catchUpSubscription =

View File

@ -14,8 +14,8 @@ function EventStoreStreamCatchUpSubscription(
//Ensure.NotNullOrEmpty(streamId, "streamId");
this._lastProcessedEventNumber = fromEventNumberExclusive || -1;
this._nextReadEventNumber = fromEventNumberExclusive || 0;
this._lastProcessedEventNumber = fromEventNumberExclusive === null ? -1 : fromEventNumberExclusive;
this._nextReadEventNumber = fromEventNumberExclusive === null ? 0 : fromEventNumberExclusive + 1;
}
util.inherits(EventStoreStreamCatchUpSubscription, EventStoreCatchUpSubscription);