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

Commit a618df7

Browse files
committed
Fixes #527 - $remove not correctly deleting Firebase data
1 parent 1197e1b commit a618df7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/FirebaseObject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
var self = this;
8686
$firebaseUtils.trimKeys(this, {});
8787
this.$value = null;
88-
return self.$inst().$remove(self.$id).then(function(ref) {
88+
return self.$inst().$remove().then(function(ref) {
8989
self.$$notify();
9090
return ref;
9191
});

tests/unit/FirebaseObject.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ describe('$FirebaseObject', function() {
425425
expect(obj.$inst().$remove).not.toHaveBeenCalled();
426426
obj.$remove();
427427
flushAll();
428-
expect(obj.$inst().$remove).toHaveBeenCalled();
428+
expect(obj.$inst().$remove).toHaveBeenCalledWith(); // should not pass a key
429429
});
430430

431431
it('should delete a primitive value', function() {

0 commit comments

Comments
 (0)