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

Commit aa4bfd9

Browse files
committed
Fix for soumak77#97 - If asking for a child with path of /, return the current ref
1 parent adad43e commit aa4bfd9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/firebase.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ MockFirebase.prototype.toString = function () {
146146
};
147147

148148
MockFirebase.prototype.child = function (childPath) {
149+
if (childPath === '/') return this;
149150
assert(childPath, 'A child path is required');
150151
var parts = _.compact(childPath.split('/'));
151152
var childKey = parts.shift();

0 commit comments

Comments
 (0)