Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/modules/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class DatabaseRef extends ReferenceBase {
const path = this.dbPath();
return this.db.off(path, evt, origCB)
.then(({callback, subscriptions}) => {
if (dbSubscriptions[path] && dbSubscriptions[path][evt].length > 0) {
if (subscriptions[path] && subscriptions[path][evt].length > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what error you were seeing, but by changing this to subscriptions, it becomes functionally broken since we want to remove the JS callbacks from the global dbSubscriptions set. The subscriptions you referenced comes from: https://github.com/chaitanya0bhagvan/react-native-firestack/blob/483e15fd4b7a8256bec99771220c4cc9721e198a/lib/modules/database.js#L490. Probably needs a better name though!

return subscriptions;
}

Expand Down Expand Up @@ -514,4 +514,4 @@ export class Database extends Base {
}
}

export default Database
export default Database