Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 84835cd

Browse files
committed
fix closeQuery to only close itself
this.query.off(); called with no parameters closes all Firebase listeners at that location. It should instead be called with the original eventType, callback and context passed in.
1 parent 45df802 commit 84835cd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

firebase-element.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,10 @@ <h3>My Firebase Data</h3>
341341
},
342342
closeQuery: function() {
343343
if (this.query) {
344-
this.query.off();
344+
this.query.off('child_added', this.childAdded, this);
345+
this.query.off('child_changed', this.childChanged, this);
346+
this.query.off('child_moved', this.childMoved, this);
347+
this.query.off('child_removed', this.childRemoved, this);
345348
}
346349
},
347350
//

0 commit comments

Comments
 (0)