File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore/local Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -91,16 +91,8 @@ IndexManager getIndexManager() {
91
91
*/
92
92
Document getDocument (DocumentKey key ) {
93
93
Mutation overlay = documentOverlayCache .getOverlay (key );
94
- MutableDocument document = null ;
95
- if (overlay == null ) {
96
- document = remoteDocumentCache .get (key );
97
- } else {
98
- // Remote document elision: avoid reading remote documents if their overlay is Set or Delete.
99
- if (overlay instanceof SetMutation || overlay instanceof DeleteMutation ) {
100
- document = MutableDocument .newInvalidDocument (key );
101
- } else {
102
- document = remoteDocumentCache .get (key );
103
- }
94
+ MutableDocument document = overlay instanceof PatchMutation ?
95
+ remoteDocumentCache .get (key ) : MutableDocument .newInvalidDocument (key );
104
96
overlay .applyToLocalView (document , null , Timestamp .now ());
105
97
}
106
98
You can’t perform that action at this time.
0 commit comments