Skip to content

Commit f1ae6f2

Browse files
committed
Fix issues caused by path type change.
1 parent aa0ab49 commit f1ae6f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/modules/database/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default class Database extends Base {
192192

193193
if (this.subscriptions[handle] && this.subscriptions[handle][eventName]) {
194194
this.subscriptions[handle][eventName].forEach((cb) => {
195-
cb(new Snapshot(new Reference(this, path.split('/'), modifiersString.split('|')), snapshot), body);
195+
cb(new Snapshot(new Reference(this, path, modifiersString.split('|')), snapshot), body);
196196
});
197197
} else {
198198
FirestackDatabase.off(path, modifiersString, eventName, () => {

lib/modules/database/reference.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default class Reference extends ReferenceBase {
121121
const modifiersString = this.query.getModifiersString();
122122
return promisify('onOnce', FirestackDatabase)(path, modifiersString, modifiers, eventName)
123123
.then(({ snapshot, path, modifiersString}) => new Snapshot(
124-
new Reference(this.db, path.split('/'), modifiersString.split('|')),
124+
new Reference(this.db, path, modifiersString.split('|')),
125125
snapshot))
126126
.then((snapshot) => {
127127
if (isFunction(cb)) cb(snapshot);

0 commit comments

Comments
 (0)