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

Commit fa95e35

Browse files
committed
Merge pull request #220 from apai4/patch-2
Fix $add promise to resolve ref
2 parents da83000 + 17e4659 commit fa95e35

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

angularfire.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
//
166166
// This function returns a promise that will be resolved when the data
167167
// has been successfully written to the server. If the promise is
168-
// resolved, it will be provided with a reference to the newly added
168+
// resolved, it will be provided with a reference to the newly added
169169
// object or primitive. The key name can be extracted using `ref.name()`.
170170
// If the promise fails, it will resolve to an error.
171171
object.$add = function(item) {
@@ -176,7 +176,7 @@
176176
if (err) {
177177
deferred.reject(err);
178178
} else {
179-
deferred.resolve();
179+
deferred.resolve(ref);
180180
}
181181
}
182182

angularfire.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)