Skip to content

Commit 1c182b1

Browse files
zlodagdavideast
authored andcommitted
Fixing a bug in child_added event handler
1 parent dcb6f5c commit 1c182b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/database/firebase_list_factory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function firebaseListObservable(ref: firebase.database.Reference | firebase.data
134134
// If the initial load has not been set and the current key is
135135
// the last key of the initialArray, we know we have hit the
136136
// initial load
137-
if (!isInitiallyEmpty) {
137+
if (!isInitiallyEmpty && !hasInitialLoad) {
138138
if (child.key === lastKey) {
139139
hasInitialLoad = true;
140140
obs.next(preserveSnapshot ? initialArray : initialArray.map(utils.unwrapMapFn));

0 commit comments

Comments
 (0)