Skip to content

Commit 6c2230b

Browse files
committed
Merge branch 'master' of github.com:fullstackreact/react-native-firestack
* 'master' of github.com:fullstackreact/react-native-firestack: fixing NPE after Database#off
2 parents 418b2c0 + 2c88075 commit 6c2230b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/modules/database.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class DatabaseRef extends ReferenceBase {
215215
const path = this.dbPath();
216216
return this.db.off(path, evt, origCB)
217217
.then(({callback, subscriptions}) => {
218-
if (dbSubscriptions[path][evt].length > 0) {
218+
if (dbSubscriptions[path] && dbSubscriptions[path][evt].length > 0) {
219219
return subscriptions;
220220
}
221221

0 commit comments

Comments
 (0)