@@ -41,8 +41,8 @@ function Query(criteria, options) {
41
41
? utils . clone ( proto . _fields )
42
42
: undefined ;
43
43
44
- this . _update = proto . _update
45
- ? utils . clone ( proto . _update )
44
+ this . _updateDoc = proto . _updateDoc
45
+ ? utils . clone ( proto . _updateDoc )
46
46
: undefined ;
47
47
48
48
this . _path = proto . _path || undefined ;
@@ -130,7 +130,7 @@ Query.prototype.toConstructor = function toConstructor() {
130
130
p . op = this . op ;
131
131
p . _conditions = utils . clone ( this . _conditions ) ;
132
132
p . _fields = utils . clone ( this . _fields ) ;
133
- p . _update = utils . clone ( this . _update ) ;
133
+ p . _updateDoc = utils . clone ( this . _updateDoc ) ;
134
134
p . _path = this . _path ;
135
135
p . _distinct = this . _distinct ;
136
136
p . _collection = this . _collection ;
@@ -1859,9 +1859,9 @@ Query.prototype.merge = function(source) {
1859
1859
utils . merge ( this . options , source . options ) ;
1860
1860
}
1861
1861
1862
- if ( source . _update ) {
1863
- this . _update || ( this . _update = { } ) ;
1864
- utils . mergeClone ( this . _update , source . _update ) ;
1862
+ if ( source . _updateDoc ) {
1863
+ this . _updateDoc || ( this . _updateDoc = { } ) ;
1864
+ utils . mergeClone ( this . _updateDoc , source . _updateDoc ) ;
1865
1865
}
1866
1866
1867
1867
if ( source . _distinct ) {
@@ -2747,13 +2747,13 @@ Query.prototype.selectedExclusively = function selectedExclusively() {
2747
2747
*/
2748
2748
2749
2749
Query . prototype . _mergeUpdate = function ( doc ) {
2750
- if ( ! this . _update ) this . _update = { } ;
2750
+ if ( ! this . _updateDoc ) this . _updateDoc = { } ;
2751
2751
if ( doc instanceof Query ) {
2752
- if ( doc . _update ) {
2753
- utils . mergeClone ( this . _update , doc . _update ) ;
2752
+ if ( doc . _updateDoc ) {
2753
+ utils . mergeClone ( this . _updateDoc , doc . _updateDoc ) ;
2754
2754
}
2755
2755
} else {
2756
- utils . mergeClone ( this . _update , doc ) ;
2756
+ utils . mergeClone ( this . _updateDoc , doc ) ;
2757
2757
}
2758
2758
} ;
2759
2759
@@ -2787,7 +2787,7 @@ Query.prototype._fieldsForExec = function() {
2787
2787
*/
2788
2788
2789
2789
Query . prototype . _updateForExec = function ( ) {
2790
- const update = utils . clone ( this . _update ) ;
2790
+ const update = utils . clone ( this . _updateDoc ) ;
2791
2791
const ops = utils . keys ( update ) ;
2792
2792
const ret = { } ;
2793
2793
0 commit comments