{"action":"created","comment":{"url":"https://api.github.com/repos/cofacts/rumors-site/pulls/comments/167386067","pull_request_review_id":95609472,"id":167386067,"diff_hunk":"@@ -99,14 +99,15 @@ export default class ReplyConnection extends React.PureComponent {\n   renderAuthor = () => {\n     const { replyConnection } = this.props;\n     const replyVersion = replyConnection.getIn(['reply', 'versions', 0]);\n-    const connectionAuthor = replyConnection.get('user');\n-    const replyAuthor = replyVersion.get('user');\n+    const connectionAuthor = replyConnection.get('user') || Map();\n+    const replyAuthor = replyVersion.get('user') || Map();\n \n-    const connectionAuthorName = connectionAuthor\n-      ? connectionAuthor.get('name')\n-      : '有人';\n+    const connectionAuthorName = connectionAuthor.get('name') || '有人';\n \n-    if (replyAuthor && connectionAuthor.get('id') !== replyAuthor.get('id')) {\n+    if (\n+      replyAuthor.get('name') &&","path":"components/ReplyConnection.js","position":16,"original_position":16,"commit_id":"1265e2f265c96edb58d95466785af8b435138daa","original_commit_id":"1265e2f265c96edb58d95466785af8b435138daa","user":{"login":"GoreStarry","id":13726538,"avatar_url":"https://avatars2.githubusercontent.com/u/13726538?v=4","gravatar_id":"","url":"https://api.github.com/users/GoreStarry","html_url":"https://github.com/GoreStarry","followers_url":"https://api.github.com/users/GoreStarry/followers","following_url":"https://api.github.com/users/GoreStarry/following{/other_user}","gists_url":"https://api.github.com/users/GoreStarry/gists{/gist_id}","starred_url":"https://api.github.com/users/GoreStarry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoreStarry/subscriptions","organizations_url":"https://api.github.com/users/GoreStarry/orgs","repos_url":"https://api.github.com/users/GoreStarry/repos","events_url":"https://api.github.com/users/GoreStarry/events{/privacy}","received_events_url":"https://api.github.com/users/GoreStarry/received_events","type":"User","site_admin":false},"body":"make sense 👍","created_at":"2018-02-10T02:32:48Z","updated_at":"2018-02-10T02:32:48Z","html_url":"https://github.com/cofacts/rumors-site/pull/79#discussion_r167386067","pull_request_url":"https://api.github.com/repos/cofacts/rumors-site/pulls/79","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cofacts/rumors-site/pulls/comments/167386067"},"html":{"href":"https://github.com/cofacts/rumors-site/pull/79#discussion_r167386067"},"pull_request":{"href":"https://api.github.com/repos/cofacts/rumors-site/pulls/79"}},"in_reply_to_id":167311690},"pull_request":{"url":"https://api.github.com/repos/cofacts/rumors-site/pulls/79","id":168305084,"html_url":"https://github.com/cofacts/rumors-site/pull/79","diff_url":"https://github.com/cofacts/rumors-site/pull/79.diff","patch_url":"https://github.com/cofacts/rumors-site/pull/79.patch","issue_url":"https://api.github.com/repos/cofacts/rumors-site/issues/79","number":79,"state":"closed","locked":false,"title":"Better null handling for authors","user":{"login":"MrOrz","id":108608,"avatar_url":"https://avatars3.githubusercontent.com/u/108608?v=4","gravatar_id":"","url":"https://api.github.com/users/MrOrz","html_url":"https://github.com/MrOrz","followers_url":"https://api.github.com/users/MrOrz/followers","following_url":"https://api.github.com/users/MrOrz/following{/other_user}","gists_url":"https://api.github.com/users/MrOrz/gists{/gist_id}","starred_url":"https://api.github.com/users/MrOrz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrOrz/subscriptions","organizations_url":"https://api.github.com/users/MrOrz/orgs","repos_url":"https://api.github.com/users/MrOrz/repos","events_url":"https://api.github.com/users/MrOrz/events{/privacy}","received_events_url":"https://api.github.com/users/MrOrz/received_events","type":"User","site_admin":false},"body":"Currently, visiting this page will show 500:\r\nhttps://cofacts.g0v.tw/article/AWF5zhDvhutQxxU6triN\r\n\r\nThe corresponding error log is:\r\n```\r\nsite_1          | TypeError: Cannot read property 'get' of null\r\nsite_1          |     at ReplyConnection._this.renderAuthor (/srv/www/.next/dist/components/ReplyConnection.js:143:43)\r\nsite_1          |     at ReplyConnection.render (/srv/www/.next/dist/components/ReplyConnection.js:185:15)\r\nsite_1          |     at za (/srv/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:32:322)\r\nsite_1          |     at a.render (/srv/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:18)\r\nsite_1          |     at a.read (/srv/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:35:250)\r\nsite_1          |     at renderToString (/srv/www/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:44:6)\r\nsite_1          |     at renderPage (/srv/www/node_modules/next/dist/server/render.js:174:26)\r\nsite_1          |     at Function.getInitialProps (/srv/www/node_modules/next/dist/server/document.js:83:25)\r\nsite_1          |     at _callee$ (/srv/www/node_modules/next/dist/lib/utils.js:36:30)\r\nsite_1          |     at tryCatch (/srv/www/node_modules/regenerator-runtime/runtime.js:65:40)\r\n```\r\n\r\nThe page contains a reply connection whose author is a user in localhost site.\r\nThis will return null in production server.\r\n\r\nThis PR fixes this by handling the case that replyConnection's author may be null.","created_at":"2018-02-09T18:00:04Z","updated_at":"2018-02-10T02:32:48Z","closed_at":"2018-02-10T02:21:03Z","merged_at":"2018-02-10T02:21:03Z","merge_commit_sha":"fd92e9a836faa346769e8fb4eb9cbd6ce42b1d22","assignee":null,"assignees":[],"requested_reviewers":[{"login":"LucienLee","id":1758453,"avatar_url":"https://avatars0.githubusercontent.com/u/1758453?v=4","gravatar_id":"","url":"https://api.github.com/users/LucienLee","html_url":"https://github.com/LucienLee","followers_url":"https://api.github.com/users/LucienLee/followers","following_url":"https://api.github.com/users/LucienLee/following{/other_user}","gists_url":"https://api.github.com/users/LucienLee/gists{/gist_id}","starred_url":"https://api.github.com/users/LucienLee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucienLee/subscriptions","organizations_url":"https://api.github.com/users/LucienLee/orgs","repos_url":"https://api.github.com/users/LucienLee/repos","events_url":"https://api.github.com/users/LucienLee/events{/privacy}","received_events_url":"https://api.github.com/users/LucienLee/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cofacts/rumors-site/pulls/79/commits","review_comments_url":"https://api.github.com/repos/cofacts/rumors-site/pulls/79/comments","review_comment_url":"https://api.github.com/repos/cofacts/rumors-site/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cofacts/rumors-site/issues/79/comments","statuses_url":"https://api.github.com/repos/cofacts/rumors-site/statuses/1265e2f265c96edb58d95466785af8b435138daa","head":{"label":"cofacts:fix-author","ref":"fix-author","sha":"1265e2f265c96edb58d95466785af8b435138daa","user":{"login":"cofacts","id":26894329,"avatar_url":"https://avatars2.githubusercontent.com/u/26894329?v=4","gravatar_id":"","url":"https://api.github.com/users/cofacts","html_url":"https://github.com/cofacts","followers_url":"https://api.github.com/users/cofacts/followers","following_url":"https://api.github.com/users/cofacts/following{/other_user}","gists_url":"https://api.github.com/users/cofacts/gists{/gist_id}","starred_url":"https://api.github.com/users/cofacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cofacts/subscriptions","organizations_url":"https://api.github.com/users/cofacts/orgs","repos_url":"https://api.github.com/users/cofacts/repos","events_url":"https://api.github.com/users/cofacts/events{/privacy}","received_events_url":"https://api.github.com/users/cofacts/received_events","type":"Organization","site_admin":false},"repo":{"id":75942611,"name":"rumors-site","full_name":"cofacts/rumors-site","owner":{"login":"cofacts","id":26894329,"avatar_url":"https://avatars2.githubusercontent.com/u/26894329?v=4","gravatar_id":"","url":"https://api.github.com/users/cofacts","html_url":"https://github.com/cofacts","followers_url":"https://api.github.com/users/cofacts/followers","following_url":"https://api.github.com/users/cofacts/following{/other_user}","gists_url":"https://api.github.com/users/cofacts/gists{/gist_id}","starred_url":"https://api.github.com/users/cofacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cofacts/subscriptions","organizations_url":"https://api.github.com/users/cofacts/orgs","repos_url":"https://api.github.com/users/cofacts/repos","events_url":"https://api.github.com/users/cofacts/events{/privacy}","received_events_url":"https://api.github.com/users/cofacts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cofacts/rumors-site","description":"Rumors list / creation UI, with server-side rendering","fork":false,"url":"https://api.github.com/repos/cofacts/rumors-site","forks_url":"https://api.github.com/repos/cofacts/rumors-site/forks","keys_url":"https://api.github.com/repos/cofacts/rumors-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cofacts/rumors-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cofacts/rumors-site/teams","hooks_url":"https://api.github.com/repos/cofacts/rumors-site/hooks","issue_events_url":"https://api.github.com/repos/cofacts/rumors-site/issues/events{/number}","events_url":"https://api.github.com/repos/cofacts/rumors-site/events","assignees_url":"https://api.github.com/repos/cofacts/rumors-site/assignees{/user}","branches_url":"https://api.github.com/repos/cofacts/rumors-site/branches{/branch}","tags_url":"https://api.github.com/repos/cofacts/rumors-site/tags","blobs_url":"https://api.github.com/repos/cofacts/rumors-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cofacts/rumors-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cofacts/rumors-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/cofacts/rumors-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cofacts/rumors-site/statuses/{sha}","languages_url":"https://api.github.com/repos/cofacts/rumors-site/languages","stargazers_url":"https://api.github.com/repos/cofacts/rumors-site/stargazers","contributors_url":"https://api.github.com/repos/cofacts/rumors-site/contributors","subscribers_url":"https://api.github.com/repos/cofacts/rumors-site/subscribers","subscription_url":"https://api.github.com/repos/cofacts/rumors-site/subscription","commits_url":"https://api.github.com/repos/cofacts/rumors-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/cofacts/rumors-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/cofacts/rumors-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/cofacts/rumors-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/cofacts/rumors-site/contents/{+path}","compare_url":"https://api.github.com/repos/cofacts/rumors-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cofacts/rumors-site/merges","archive_url":"https://api.github.com/repos/cofacts/rumors-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cofacts/rumors-site/downloads","issues_url":"https://api.github.com/repos/cofacts/rumors-site/issues{/number}","pulls_url":"https://api.github.com/repos/cofacts/rumors-site/pulls{/number}","milestones_url":"https://api.github.com/repos/cofacts/rumors-site/milestones{/number}","notifications_url":"https://api.github.com/repos/cofacts/rumors-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cofacts/rumors-site/labels{/name}","releases_url":"https://api.github.com/repos/cofacts/rumors-site/releases{/id}","deployments_url":"https://api.github.com/repos/cofacts/rumors-site/deployments","created_at":"2016-12-08T14:00:11Z","updated_at":"2018-02-07T18:23:22Z","pushed_at":"2018-02-10T02:21:03Z","git_url":"git://github.com/cofacts/rumors-site.git","ssh_url":"git@github.com:cofacts/rumors-site.git","clone_url":"https://github.com/cofacts/rumors-site.git","svn_url":"https://github.com/cofacts/rumors-site","homepage":"https://cofacts.g0v.tw","size":558,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":11,"watchers":11,"default_branch":"master"}},"base":{"label":"cofacts:master","ref":"master","sha":"572a7021f42a02a78536f97e2b123984d784357c","user":{"login":"cofacts","id":26894329,"avatar_url":"https://avatars2.githubusercontent.com/u/26894329?v=4","gravatar_id":"","url":"https://api.github.com/users/cofacts","html_url":"https://github.com/cofacts","followers_url":"https://api.github.com/users/cofacts/followers","following_url":"https://api.github.com/users/cofacts/following{/other_user}","gists_url":"https://api.github.com/users/cofacts/gists{/gist_id}","starred_url":"https://api.github.com/users/cofacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cofacts/subscriptions","organizations_url":"https://api.github.com/users/cofacts/orgs","repos_url":"https://api.github.com/users/cofacts/repos","events_url":"https://api.github.com/users/cofacts/events{/privacy}","received_events_url":"https://api.github.com/users/cofacts/received_events","type":"Organization","site_admin":false},"repo":{"id":75942611,"name":"rumors-site","full_name":"cofacts/rumors-site","owner":{"login":"cofacts","id":26894329,"avatar_url":"https://avatars2.githubusercontent.com/u/26894329?v=4","gravatar_id":"","url":"https://api.github.com/users/cofacts","html_url":"https://github.com/cofacts","followers_url":"https://api.github.com/users/cofacts/followers","following_url":"https://api.github.com/users/cofacts/following{/other_user}","gists_url":"https://api.github.com/users/cofacts/gists{/gist_id}","starred_url":"https://api.github.com/users/cofacts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cofacts/subscriptions","organizations_url":"https://api.github.com/users/cofacts/orgs","repos_url":"https://api.github.com/users/cofacts/repos","events_url":"https://api.github.com/users/cofacts/events{/privacy}","received_events_url":"https://api.github.com/users/cofacts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cofacts/rumors-site","description":"Rumors list / creation UI, with server-side rendering","fork":false,"url":"https://api.github.com/repos/cofacts/rumors-site","forks_url":"https://api.github.com/repos/cofacts/rumors-site/forks","keys_url":"https://api.github.com/repos/cofacts/rumors-site/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cofacts/rumors-site/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cofacts/rumors-site/teams","hooks_url":"https://api.github.com/repos/cofacts/rumors-site/hooks","issue_events_url":"https://api.github.com/repos/cofacts/rumors-site/issues/events{/number}","events_url":"https://api.github.com/repos/cofacts/rumors-site/events","assignees_url":"https://api.github.com/repos/cofacts/rumors-site/assignees{/user}","branches_url":"https://api.github.com/repos/cofacts/rumors-site/branches{/branch}","tags_url":"https://api.github.com/repos/cofacts/rumors-site/tags","blobs_url":"https://api.github.com/repos/cofacts/rumors-site/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cofacts/rumors-site/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cofacts/rumors-site/git/refs{/sha}","trees_url":"https://api.github.com/repos/cofacts/rumors-site/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cofacts/rumors-site/statuses/{sha}","languages_url":"https://api.github.com/repos/cofacts/rumors-site/languages","stargazers_url":"https://api.github.com/repos/cofacts/rumors-site/stargazers","contributors_url":"https://api.github.com/repos/cofacts/rumors-site/contributors","subscribers_url":"https://api.github.com/repos/cofacts/rumors-site/subscribers","subscription_url":"https://api.github.com/repos/cofacts/rumors-site/subscription","commits_url":"https://api.github.com/repos/cofacts/rumors-site/commits{/sha}","git_commits_url":"https://api.github.com/repos/cofacts/rumors-site/git/commits{/sha}","comments_url":"https://api.github.com/repos/cofacts/rumors-site/comments{/number}","issue_comment_url":"https://api.github.com/repos/cofacts/rumors-site/issues/comments{/number}","contents_url":"https://api.github.com/repos/cofacts/rumors-site/contents/{+path}","compare_url":"https://api.github.com/repos/cofacts/rumors-site/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cofacts/rumors-site/merges","archive_url":"https://api.github.com/repos/cofacts/rumors-site/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cofacts/rumors-site/downloads","issues_url":"https://api.github.com/repos/cofacts/rumors-site/issues{/number}","pulls_url":"https://api.github.com/repos/cofacts/rumors-site/pulls{/number}","milestones_url":"https://api.github.com/repos/cofacts/rumors-site/milestones{/number}","notifications_url":"https://api.github.com/repos/cofacts/rumors-site/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cofacts/rumors-site/labels{/name}","releases_url":"https://api.github.com/repos/cofacts/rumors-site/releases{/id}","deployments_url":"https://api.github.com/repos/cofacts/rumors-site/deployments","created_at":"2016-12-08T14:00:11Z","updated_at":"2018-02-07T18:23:22Z","pushed_at":"2018-02-10T02:21:03Z","git_url":"git://github.com/cofacts/rumors-site.git","ssh_url":"git@github.com:cofacts/rumors-site.git","clone_url":"https://github.com/cofacts/rumors-site.git","svn_url":"https://github.com/cofacts/rumors-site","homepage":"https://cofacts.g0v.tw","size":558,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":5,"open_issues":11,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cofacts/rumors-site/pulls/79"},"html":{"href":"https://github.com/cofacts/rumors-site/pull/79"},"issue":{"href":"https://api.github.com/repos/cofacts/rumors-site/issues/79"},"comments":{"href":"https://api.github.com/repos/cofacts/rumors-site/issues/79/comments"},"review_comments":{"href":"https://api.github.com/repos/cofacts/rumors-site/pulls/79/comments"},"review_comment":{"href":"https://api.github.com/repos/cofacts/rumors-site/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cofacts/rumors-site/pulls/79/commits"},"statuses":{"href":"https://api.github.com/repos/cofacts/rumors-site/statuses/1265e2f265c96edb58d95466785af8b435138daa"}},"author_association":"OWNER"}}
{"actor":{"display_login":"GoreStarry"}}