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

Commit

Permalink
fix closeQuery to only close itself
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jshortall committed Dec 19, 2014
1 parent 45df802 commit 84835cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion firebase-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,10 @@ <h3>My Firebase Data</h3>
},
closeQuery: function() {
if (this.query) {
this.query.off();
this.query.off('child_added', this.childAdded, this);
this.query.off('child_changed', this.childChanged, this);
this.query.off('child_moved', this.childMoved, this);
this.query.off('child_removed', this.childRemoved, this);
}
},
//
Expand Down

0 comments on commit 84835cd

Please sign in to comment.