{"action":"created","comment":{"url":"https://api.github.com/repos/invertase/react-native-firebase/pulls/comments/150013148","pull_request_review_id":75499619,"id":150013148,"diff_hunk":"@@ -195,8 +195,7 @@ export default class Reference extends ReferenceBase {\n     return new Promise((resolve, reject) => {\n       const onCompleteWrapper = (error, committed, snapshotData) => {\n         if (isFunction(onComplete)) {\n-          if (error) return onComplete(error, committed, null);\n-          return onComplete(null, committed, new Snapshot(this, snapshotData));\n+          onComplete(error, committed, new Snapshot(this, snapshotData));","path":"lib/modules/database/reference.js","position":6,"original_position":6,"commit_id":"ba8242f19a570a4c6a199f71a7e5b0bc85b5ece8","original_commit_id":"ba8242f19a570a4c6a199f71a7e5b0bc85b5ece8","user":{"login":"chrisbianca","id":10723021,"avatar_url":"https://avatars0.githubusercontent.com/u/10723021?v=4","gravatar_id":"","url":"https://api.github.com/users/chrisbianca","html_url":"https://github.com/chrisbianca","followers_url":"https://api.github.com/users/chrisbianca/followers","following_url":"https://api.github.com/users/chrisbianca/following{/other_user}","gists_url":"https://api.github.com/users/chrisbianca/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisbianca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisbianca/subscriptions","organizations_url":"https://api.github.com/users/chrisbianca/orgs","repos_url":"https://api.github.com/users/chrisbianca/repos","events_url":"https://api.github.com/users/chrisbianca/events{/privacy}","received_events_url":"https://api.github.com/users/chrisbianca/received_events","type":"User","site_admin":false},"body":"@gyfelton To maintain the previous functionality, I believe this should be:\r\n```\r\nif (error) {\r\n  onComplete(error, committed, null);\r\n} else {\r\n  onComplete(null, committed, new Snapshot(this, snapshotData));\r\n}\r\n```","created_at":"2017-11-09T16:28:52Z","updated_at":"2017-11-09T16:28:53Z","html_url":"https://github.com/invertase/react-native-firebase/pull/603#discussion_r150013148","pull_request_url":"https://api.github.com/repos/invertase/react-native-firebase/pulls/603","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/invertase/react-native-firebase/pulls/comments/150013148"},"html":{"href":"https://github.com/invertase/react-native-firebase/pull/603#discussion_r150013148"},"pull_request":{"href":"https://api.github.com/repos/invertase/react-native-firebase/pulls/603"}}},"pull_request":{"url":"https://api.github.com/repos/invertase/react-native-firebase/pulls/603","id":151684352,"html_url":"https://github.com/invertase/react-native-firebase/pull/603","diff_url":"https://github.com/invertase/react-native-firebase/pull/603.diff","patch_url":"https://github.com/invertase/react-native-firebase/pull/603.patch","issue_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/603","number":603,"state":"open","locked":false,"title":"Make sure the promise is resolved/rejected for transaction","user":{"login":"gyfelton","id":493722,"avatar_url":"https://avatars0.githubusercontent.com/u/493722?v=4","gravatar_id":"","url":"https://api.github.com/users/gyfelton","html_url":"https://github.com/gyfelton","followers_url":"https://api.github.com/users/gyfelton/followers","following_url":"https://api.github.com/users/gyfelton/following{/other_user}","gists_url":"https://api.github.com/users/gyfelton/gists{/gist_id}","starred_url":"https://api.github.com/users/gyfelton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyfelton/subscriptions","organizations_url":"https://api.github.com/users/gyfelton/orgs","repos_url":"https://api.github.com/users/gyfelton/repos","events_url":"https://api.github.com/users/gyfelton/events{/privacy}","received_events_url":"https://api.github.com/users/gyfelton/received_events","type":"User","site_admin":false},"body":"Right now the following code will be broken under v3.x.x:\r\n```\r\nasync function() {\r\n  await ref.transaction(\r\n              function(foo) {\r\n                 // deal with foo\r\n              },\r\n              function(error, committed, ss) { \r\n                 // additional work on complete callback\r\n              },\r\n              true     \r\n          );\r\n  // NOTE: Code from here will never execute because promise above never gets resolved\r\n}\r\n```\r\nv2 will work because the promise is always resolved, v3 does not because it now depends on whether the promise is resolved in the completion callback\r\n\r\n@kurtvan","created_at":"2017-11-09T15:37:29Z","updated_at":"2017-11-09T16:28:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96ff0c582ad9661b64646425ee9feb1413d2c020","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/invertase/react-native-firebase/pulls/603/commits","review_comments_url":"https://api.github.com/repos/invertase/react-native-firebase/pulls/603/comments","review_comment_url":"https://api.github.com/repos/invertase/react-native-firebase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/603/comments","statuses_url":"https://api.github.com/repos/invertase/react-native-firebase/statuses/ba8242f19a570a4c6a199f71a7e5b0bc85b5ece8","head":{"label":"gyfelton:transaction-promise-resolve","ref":"transaction-promise-resolve","sha":"ba8242f19a570a4c6a199f71a7e5b0bc85b5ece8","user":{"login":"gyfelton","id":493722,"avatar_url":"https://avatars0.githubusercontent.com/u/493722?v=4","gravatar_id":"","url":"https://api.github.com/users/gyfelton","html_url":"https://github.com/gyfelton","followers_url":"https://api.github.com/users/gyfelton/followers","following_url":"https://api.github.com/users/gyfelton/following{/other_user}","gists_url":"https://api.github.com/users/gyfelton/gists{/gist_id}","starred_url":"https://api.github.com/users/gyfelton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyfelton/subscriptions","organizations_url":"https://api.github.com/users/gyfelton/orgs","repos_url":"https://api.github.com/users/gyfelton/repos","events_url":"https://api.github.com/users/gyfelton/events{/privacy}","received_events_url":"https://api.github.com/users/gyfelton/received_events","type":"User","site_admin":false},"repo":{"id":110132109,"name":"react-native-firebase","full_name":"gyfelton/react-native-firebase","owner":{"login":"gyfelton","id":493722,"avatar_url":"https://avatars0.githubusercontent.com/u/493722?v=4","gravatar_id":"","url":"https://api.github.com/users/gyfelton","html_url":"https://github.com/gyfelton","followers_url":"https://api.github.com/users/gyfelton/followers","following_url":"https://api.github.com/users/gyfelton/following{/other_user}","gists_url":"https://api.github.com/users/gyfelton/gists{/gist_id}","starred_url":"https://api.github.com/users/gyfelton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyfelton/subscriptions","organizations_url":"https://api.github.com/users/gyfelton/orgs","repos_url":"https://api.github.com/users/gyfelton/repos","events_url":"https://api.github.com/users/gyfelton/events{/privacy}","received_events_url":"https://api.github.com/users/gyfelton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gyfelton/react-native-firebase","description":"A well tested feature rich Firebase implementation for React Native, supporting both iOS & Android platforms for 10+ Firebase modules (including Cloud Firestore) 🔥","fork":true,"url":"https://api.github.com/repos/gyfelton/react-native-firebase","forks_url":"https://api.github.com/repos/gyfelton/react-native-firebase/forks","keys_url":"https://api.github.com/repos/gyfelton/react-native-firebase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gyfelton/react-native-firebase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gyfelton/react-native-firebase/teams","hooks_url":"https://api.github.com/repos/gyfelton/react-native-firebase/hooks","issue_events_url":"https://api.github.com/repos/gyfelton/react-native-firebase/issues/events{/number}","events_url":"https://api.github.com/repos/gyfelton/react-native-firebase/events","assignees_url":"https://api.github.com/repos/gyfelton/react-native-firebase/assignees{/user}","branches_url":"https://api.github.com/repos/gyfelton/react-native-firebase/branches{/branch}","tags_url":"https://api.github.com/repos/gyfelton/react-native-firebase/tags","blobs_url":"https://api.github.com/repos/gyfelton/react-native-firebase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gyfelton/react-native-firebase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gyfelton/react-native-firebase/git/refs{/sha}","trees_url":"https://api.github.com/repos/gyfelton/react-native-firebase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gyfelton/react-native-firebase/statuses/{sha}","languages_url":"https://api.github.com/repos/gyfelton/react-native-firebase/languages","stargazers_url":"https://api.github.com/repos/gyfelton/react-native-firebase/stargazers","contributors_url":"https://api.github.com/repos/gyfelton/react-native-firebase/contributors","subscribers_url":"https://api.github.com/repos/gyfelton/react-native-firebase/subscribers","subscription_url":"https://api.github.com/repos/gyfelton/react-native-firebase/subscription","commits_url":"https://api.github.com/repos/gyfelton/react-native-firebase/commits{/sha}","git_commits_url":"https://api.github.com/repos/gyfelton/react-native-firebase/git/commits{/sha}","comments_url":"https://api.github.com/repos/gyfelton/react-native-firebase/comments{/number}","issue_comment_url":"https://api.github.com/repos/gyfelton/react-native-firebase/issues/comments{/number}","contents_url":"https://api.github.com/repos/gyfelton/react-native-firebase/contents/{+path}","compare_url":"https://api.github.com/repos/gyfelton/react-native-firebase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gyfelton/react-native-firebase/merges","archive_url":"https://api.github.com/repos/gyfelton/react-native-firebase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gyfelton/react-native-firebase/downloads","issues_url":"https://api.github.com/repos/gyfelton/react-native-firebase/issues{/number}","pulls_url":"https://api.github.com/repos/gyfelton/react-native-firebase/pulls{/number}","milestones_url":"https://api.github.com/repos/gyfelton/react-native-firebase/milestones{/number}","notifications_url":"https://api.github.com/repos/gyfelton/react-native-firebase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gyfelton/react-native-firebase/labels{/name}","releases_url":"https://api.github.com/repos/gyfelton/react-native-firebase/releases{/id}","deployments_url":"https://api.github.com/repos/gyfelton/react-native-firebase/deployments","created_at":"2017-11-09T15:26:56Z","updated_at":"2017-11-09T15:26:58Z","pushed_at":"2017-11-09T15:34:52Z","git_url":"git://github.com/gyfelton/react-native-firebase.git","ssh_url":"git@github.com:gyfelton/react-native-firebase.git","clone_url":"https://github.com/gyfelton/react-native-firebase.git","svn_url":"https://github.com/gyfelton/react-native-firebase","homepage":"https://rnfirebase.io","size":2715,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"invertase:master","ref":"master","sha":"89ce31689e46f6dde9fa202b0ed582a03b5d283a","user":{"login":"invertase","id":13588260,"avatar_url":"https://avatars3.githubusercontent.com/u/13588260?v=4","gravatar_id":"","url":"https://api.github.com/users/invertase","html_url":"https://github.com/invertase","followers_url":"https://api.github.com/users/invertase/followers","following_url":"https://api.github.com/users/invertase/following{/other_user}","gists_url":"https://api.github.com/users/invertase/gists{/gist_id}","starred_url":"https://api.github.com/users/invertase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/invertase/subscriptions","organizations_url":"https://api.github.com/users/invertase/orgs","repos_url":"https://api.github.com/users/invertase/repos","events_url":"https://api.github.com/users/invertase/events{/privacy}","received_events_url":"https://api.github.com/users/invertase/received_events","type":"Organization","site_admin":false},"repo":{"id":80616041,"name":"react-native-firebase","full_name":"invertase/react-native-firebase","owner":{"login":"invertase","id":13588260,"avatar_url":"https://avatars3.githubusercontent.com/u/13588260?v=4","gravatar_id":"","url":"https://api.github.com/users/invertase","html_url":"https://github.com/invertase","followers_url":"https://api.github.com/users/invertase/followers","following_url":"https://api.github.com/users/invertase/following{/other_user}","gists_url":"https://api.github.com/users/invertase/gists{/gist_id}","starred_url":"https://api.github.com/users/invertase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/invertase/subscriptions","organizations_url":"https://api.github.com/users/invertase/orgs","repos_url":"https://api.github.com/users/invertase/repos","events_url":"https://api.github.com/users/invertase/events{/privacy}","received_events_url":"https://api.github.com/users/invertase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/invertase/react-native-firebase","description":"A well tested feature rich Firebase implementation for React Native, supporting both iOS & Android platforms for 10+ Firebase modules (including Cloud Firestore) 🔥","fork":false,"url":"https://api.github.com/repos/invertase/react-native-firebase","forks_url":"https://api.github.com/repos/invertase/react-native-firebase/forks","keys_url":"https://api.github.com/repos/invertase/react-native-firebase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/invertase/react-native-firebase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/invertase/react-native-firebase/teams","hooks_url":"https://api.github.com/repos/invertase/react-native-firebase/hooks","issue_events_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/events{/number}","events_url":"https://api.github.com/repos/invertase/react-native-firebase/events","assignees_url":"https://api.github.com/repos/invertase/react-native-firebase/assignees{/user}","branches_url":"https://api.github.com/repos/invertase/react-native-firebase/branches{/branch}","tags_url":"https://api.github.com/repos/invertase/react-native-firebase/tags","blobs_url":"https://api.github.com/repos/invertase/react-native-firebase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/invertase/react-native-firebase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/invertase/react-native-firebase/git/refs{/sha}","trees_url":"https://api.github.com/repos/invertase/react-native-firebase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/invertase/react-native-firebase/statuses/{sha}","languages_url":"https://api.github.com/repos/invertase/react-native-firebase/languages","stargazers_url":"https://api.github.com/repos/invertase/react-native-firebase/stargazers","contributors_url":"https://api.github.com/repos/invertase/react-native-firebase/contributors","subscribers_url":"https://api.github.com/repos/invertase/react-native-firebase/subscribers","subscription_url":"https://api.github.com/repos/invertase/react-native-firebase/subscription","commits_url":"https://api.github.com/repos/invertase/react-native-firebase/commits{/sha}","git_commits_url":"https://api.github.com/repos/invertase/react-native-firebase/git/commits{/sha}","comments_url":"https://api.github.com/repos/invertase/react-native-firebase/comments{/number}","issue_comment_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/comments{/number}","contents_url":"https://api.github.com/repos/invertase/react-native-firebase/contents/{+path}","compare_url":"https://api.github.com/repos/invertase/react-native-firebase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/invertase/react-native-firebase/merges","archive_url":"https://api.github.com/repos/invertase/react-native-firebase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/invertase/react-native-firebase/downloads","issues_url":"https://api.github.com/repos/invertase/react-native-firebase/issues{/number}","pulls_url":"https://api.github.com/repos/invertase/react-native-firebase/pulls{/number}","milestones_url":"https://api.github.com/repos/invertase/react-native-firebase/milestones{/number}","notifications_url":"https://api.github.com/repos/invertase/react-native-firebase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/invertase/react-native-firebase/labels{/name}","releases_url":"https://api.github.com/repos/invertase/react-native-firebase/releases{/id}","deployments_url":"https://api.github.com/repos/invertase/react-native-firebase/deployments","created_at":"2017-02-01T12:01:03Z","updated_at":"2017-11-09T11:28:02Z","pushed_at":"2017-11-09T15:40:02Z","git_url":"git://github.com/invertase/react-native-firebase.git","ssh_url":"git@github.com:invertase/react-native-firebase.git","clone_url":"https://github.com/invertase/react-native-firebase.git","svn_url":"https://github.com/invertase/react-native-firebase","homepage":"https://rnfirebase.io","size":2717,"stargazers_count":1518,"watchers_count":1518,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":197,"mirror_url":null,"archived":false,"open_issues_count":17,"forks":197,"open_issues":17,"watchers":1518,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/invertase/react-native-firebase/pulls/603"},"html":{"href":"https://github.com/invertase/react-native-firebase/pull/603"},"issue":{"href":"https://api.github.com/repos/invertase/react-native-firebase/issues/603"},"comments":{"href":"https://api.github.com/repos/invertase/react-native-firebase/issues/603/comments"},"review_comments":{"href":"https://api.github.com/repos/invertase/react-native-firebase/pulls/603/comments"},"review_comment":{"href":"https://api.github.com/repos/invertase/react-native-firebase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/invertase/react-native-firebase/pulls/603/commits"},"statuses":{"href":"https://api.github.com/repos/invertase/react-native-firebase/statuses/ba8242f19a570a4c6a199f71a7e5b0bc85b5ece8"}},"author_association":"NONE"}}
{"actor":{"display_login":"chrisbianca"}}