Skip to content

Commit d93c0b5

Browse files
committed
Don't check FE there
1 parent 0d14ee9 commit d93c0b5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/firestore/collection/changes.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function sortedChanges<T>(query: Query, events: DocumentChangeType[]): Ob
3131
const docChanges = changes.payload.docChanges(options);
3232
if (firstEmission) {
3333
return [{ type: 'value', payload: combineChanges([], docChanges, events) } as DocumentChangeOrMetadata<T>];
34-
} else if (firstEmission && docChanges.length > 0) {
34+
} else if (docChanges.length > 0) {
3535
return docChanges;
3636
} else {
3737
return [{ type: 'metadata', payload: changes.payload.metadata } as DocumentChangeOrMetadata<T>];
@@ -40,7 +40,8 @@ export function sortedChanges<T>(query: Query, events: DocumentChangeType[]): Ob
4040
tap(() => firstEmission = false),
4141
tap(change => console.log("change", change)),
4242
scan((current, changes) => combineChanges(current, changes, events), new Array<DocumentChange<T>>()),
43-
map(changes => changes.map(c => ({ type: c.type, payload: c } as DocumentChangeAction<T>)))
43+
map(changes => changes.map(c => ({ type: c.type, payload: c } as DocumentChangeAction<T>))),
44+
tap(change => console.log("c&m", change)),
4445
);
4546
}
4647

0 commit comments

Comments
 (0)