File tree 1 file changed +6
-1
lines changed
packages/firestore/src/local
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import {
26
26
DocumentMap ,
27
27
MaybeDocumentMap
28
28
} from '../model/collections' ;
29
- import { MaybeDocument } from '../model/document' ;
29
+ import { MaybeDocument , NoDocument } from '../model/document' ;
30
30
import { DocumentKey } from '../model/document_key' ;
31
31
import { Mutation } from '../model/mutation' ;
32
32
import {
@@ -467,8 +467,13 @@ export class LocalStore {
467
467
// cache, though we make an exception for SnapshotVersion.MIN which
468
468
// can happen for manufactured events (e.g. in the case of a limbo
469
469
// document resolution failing).
470
+ //
471
+ // Also disregard any existing NoDocument. These documents can have
472
+ // synthesized versions based on read times after any actual
473
+ // committed version on the server.
470
474
if (
471
475
existingDoc == null ||
476
+ ( existingDoc instanceof NoDocument ) ||
472
477
doc . version . isEqual ( SnapshotVersion . MIN ) ||
473
478
doc . version . compareTo ( existingDoc . version ) >= 0
474
479
) {
You can’t perform that action at this time.
0 commit comments