Fix #41
This commit is contained in:
@ -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 =
|
||||
|
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user