File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1035,7 +1035,7 @@ function applyWriteToRemoteDocuments(
1035
1035
'ackVersions should contain every doc in the write.'
1036
1036
) ;
1037
1037
if ( doc . version . compareTo ( ackVersion ! ) < 0 ) {
1038
- batch . applyToRemoteDocument ( docKey , doc , batchResult ) ;
1038
+ batch . applyToRemoteDocument ( doc , batchResult ) ;
1039
1039
if ( doc . isValidDocument ( ) ) {
1040
1040
// We use the commitVersion as the readTime rather than the
1041
1041
// document's updateTime since the updateTime is not advanced
Original file line number Diff line number Diff line change @@ -246,9 +246,9 @@ export function applyMutationToRemoteDocument(
246
246
}
247
247
248
248
/**
249
- * Applies this mutation to the given document or null for the purposes of
250
- * computing the new local view of a document. If the input document doesn't
251
- * match the expected state, the document is not modified.
249
+ * Applies this mutation to the given document for the purposes of computing
250
+ * the new local view of a document. If the input document doesn't match the
251
+ * expected state, the document is not modified.
252
252
*
253
253
* @param mutation - The mutation to apply.
254
254
* @param document - The document to mutate. The input document can be an
Original file line number Diff line number Diff line change @@ -64,15 +64,13 @@ export class MutationBatch {
64
64
65
65
/**
66
66
* Applies all the mutations in this MutationBatch to the specified document
67
- * to create a new remote document
67
+ * to compute the state of the remote document
68
68
*
69
- * @param docKey - The key of the document to apply mutations to.
70
69
* @param document - The document to apply mutations to.
71
70
* @param batchResult - The result of applying the MutationBatch to the
72
71
* backend.
73
72
*/
74
73
applyToRemoteDocument (
75
- docKey : DocumentKey ,
76
74
document : MutableDocument ,
77
75
batchResult : MutationBatchResult
78
76
) : void {
@@ -86,7 +84,7 @@ export class MutationBatch {
86
84
87
85
for ( let i = 0 ; i < this . mutations . length ; i ++ ) {
88
86
const mutation = this . mutations [ i ] ;
89
- if ( mutation . key . isEqual ( docKey ) ) {
87
+ if ( mutation . key . isEqual ( document . key ) ) {
90
88
const mutationResult = mutationResults [ i ] ;
91
89
applyMutationToRemoteDocument ( mutation , document , mutationResult ) ;
92
90
}
You can’t perform that action at this time.
0 commit comments