Cannot read property replace of undefined when path is '/' #97
Closed
Description
const firebaseMock = require("firebase-mock")
const mockdatabase = new firebaseMock.MockFirebase()
mockdatabase.child('/') //=> TypeError
Stacktrace:
TypeError "Cannot read property 'replace' of undefined"
at Object.mergePaths (node_modules/firebase-mock/src/utils.js:12:46)
at MockFirebase.child (node_modules/firebase-mock/src/firebase.js:154:36)
Firebase JS SDK behavior:
firebase.database().ref('/') //=> Reference
firebase.database().ref('/').child('/') //=> Reference
(Both reference the same path, "/")