Skip to content

Commit 3bdcdee

Browse files
committed
Fixed bug where the reference value(s) would not be found
1 parent 94fc56d commit 3bdcdee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/sequence.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Sequence.prototype._setHooks = function() {
181181
if (err) return next();
182182
if (obj) return next();
183183
else {
184-
referenceValue = _this._getCounterReferenceField(_thisquery._update['$setOnInsert']);
184+
referenceValue = _this._getCounterReferenceField(_thisquery._update);
185185
_this._setNextCounter(_this._options.reference_fields, referenceValue, function(err, seq) {
186186
if (err) return next();
187187
_thisquery._update['$setOnInsert'][_this._options.inc_field] = seq;
@@ -204,7 +204,7 @@ Sequence.prototype._setHooks = function() {
204204
if (err) return next();
205205
if (obj) return next();
206206
else {
207-
referenceValue = _this._getCounterReferenceField(_thisquery._update['$setOnInsert']);
207+
referenceValue = _this._getCounterReferenceField(_thisquery._update);
208208
_this._setNextCounter(_this._options.reference_fields, referenceValue, function(err, seq) {
209209
if (err) return next();
210210
_thisquery._update['$setOnInsert'][_this._options.inc_field] = seq;

0 commit comments

Comments
 (0)