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

Commit

Permalink
return a ref from push()
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Jun 4, 2014
1 parent c76c414 commit 584795e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion firebase-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,14 @@ <h3>My Firebase Data</h3>
this.ref.set(this.data);
},
push: function(item) {
var neo;
if (this.data instanceof Array) {
this.ref.commitProperty(this.data.push(item)-1);
} else {
this.ref.push(item);
neo = this.ref.push(item);
}
this.dataChange();
return neo;
}
});
</script>
Expand Down

0 comments on commit 584795e

Please sign in to comment.