Skip to content

Parity of response format between ios and android #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 9, 2016
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