File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ Sequence.prototype._setHooks = function() {
179179 if ( err ) return next ( ) ;
180180 if ( obj ) return next ( ) ;
181181 else {
182- referenceValue = _this . _getCounterReferenceField ( _thisquery . _update [ '$setOnInsert' ] ) ;
182+ referenceValue = _this . _getCounterReferenceField ( _thisquery . _update ) ;
183183 _this . _setNextCounter ( _this . _options . reference_fields , referenceValue , function ( err , seq ) {
184184 if ( err ) return next ( ) ;
185185 _thisquery . _update [ '$setOnInsert' ] = _thisquery . _update [ '$setOnInsert' ] || { } ;
@@ -190,10 +190,6 @@ Sequence.prototype._setHooks = function() {
190190 } ) ;
191191 } ) ;
192192
193- // this._schema.post('findOneAndUpdate', function(next) {
194- // console.dir(this);
195- // });
196-
197193 this . _schema . pre ( 'update' , function ( next , done ) {
198194 // jscs:disable
199195 var _thisquery = this ,
@@ -206,7 +202,7 @@ Sequence.prototype._setHooks = function() {
206202 if ( err ) return next ( ) ;
207203 if ( obj ) return next ( ) ;
208204 else {
209- referenceValue = _this . _getCounterReferenceField ( _thisquery . _update [ '$setOnInsert' ] ) ;
205+ referenceValue = _this . _getCounterReferenceField ( _thisquery . _update ) ;
210206 _this . _setNextCounter ( _this . _options . reference_fields , referenceValue , function ( err , seq ) {
211207 if ( err ) return next ( ) ;
212208 _thisquery . _update [ '$setOnInsert' ] = _thisquery . _update [ '$setOnInsert' ] || { } ;
You can’t perform that action at this time.
0 commit comments