{"action":"created","comment":{"url":"https://api.github.com/repos/supasate/connected-react-router/pulls/comments/232683532","pull_request_review_id":173932212,"id":232683532,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjY4MzUzMg==","diff_hunk":"@@ -2,8 +2,16 @@ import { matchPath } from \"react-router\"\n \n const createSelectors = (structure) => {\n   const { getIn, toJS } = structure\n-  const getLocation = state => toJS(getIn(state, ['router', 'location']))\n-  const getAction = state => toJS(getIn(state, ['router', 'action']))\n+  const _getLocation = state => getIn(state, ['location'])\n+  const _getAction = state => getIn(state, ['action'])\n+  const isRouter = (value) => value != null && typeof value === 'object' && _getLocation(value) && _getAction(value)\n+  const getRouter = state => {\n+    const router = toJS(getIn(state, ['router']))\n+    if (!isRouter(router)) { throw 'Could not find router reducer in state tree, it must be mounted under \"router\"' }\n+    return router\n+  }\n+  const getLocation = state => toJS(_getLocation(getRouter(state)))\n+  const getAction = state => toJS(_getAction(getRouter(state)))","path":"src/selectors.js","position":17,"original_position":15,"commit_id":"0c2e818ae6c0702f2c3295815ee1d85c23dd723b","original_commit_id":"9ed9c38a2679900709c2323d048f503987e296be","user":{"login":"supasate","id":237753,"node_id":"MDQ6VXNlcjIzNzc1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/237753?v=4","gravatar_id":"","url":"https://api.github.com/users/supasate","html_url":"https://github.com/supasate","followers_url":"https://api.github.com/users/supasate/followers","following_url":"https://api.github.com/users/supasate/following{/other_user}","gists_url":"https://api.github.com/users/supasate/gists{/gist_id}","starred_url":"https://api.github.com/users/supasate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supasate/subscriptions","organizations_url":"https://api.github.com/users/supasate/orgs","repos_url":"https://api.github.com/users/supasate/repos","events_url":"https://api.github.com/users/supasate/events{/privacy}","received_events_url":"https://api.github.com/users/supasate/received_events","type":"User","site_admin":false},"body":"I prefer keeping it here for backward compatibility. By the way, `_getLocation` under `getLocation` seems redundant to me. `getIn(getRouter(state), ['location'])` seems to be more straightforward.","created_at":"2018-11-12T14:44:20Z","updated_at":"2018-11-12T14:44:21Z","html_url":"https://github.com/supasate/connected-react-router/pull/175#discussion_r232683532","pull_request_url":"https://api.github.com/repos/supasate/connected-react-router/pulls/175","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/supasate/connected-react-router/pulls/comments/232683532"},"html":{"href":"https://github.com/supasate/connected-react-router/pull/175#discussion_r232683532"},"pull_request":{"href":"https://api.github.com/repos/supasate/connected-react-router/pulls/175"}},"in_reply_to_id":232671725},"pull_request":{"url":"https://api.github.com/repos/supasate/connected-react-router/pulls/175","id":228477421,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NDc3NDIx","html_url":"https://github.com/supasate/connected-react-router/pull/175","diff_url":"https://github.com/supasate/connected-react-router/pull/175.diff","patch_url":"https://github.com/supasate/connected-react-router/pull/175.patch","issue_url":"https://api.github.com/repos/supasate/connected-react-router/issues/175","number":175,"state":"open","locked":false,"title":"Throw helpful error when router reducer not mounted under \"router\"","user":{"login":"mattvague","id":64985,"node_id":"MDQ6VXNlcjY0OTg1","avatar_url":"https://avatars0.githubusercontent.com/u/64985?v=4","gravatar_id":"","url":"https://api.github.com/users/mattvague","html_url":"https://github.com/mattvague","followers_url":"https://api.github.com/users/mattvague/followers","following_url":"https://api.github.com/users/mattvague/following{/other_user}","gists_url":"https://api.github.com/users/mattvague/gists{/gist_id}","starred_url":"https://api.github.com/users/mattvague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattvague/subscriptions","organizations_url":"https://api.github.com/users/mattvague/orgs","repos_url":"https://api.github.com/users/mattvague/repos","events_url":"https://api.github.com/users/mattvague/events{/privacy}","received_events_url":"https://api.github.com/users/mattvague/received_events","type":"User","site_admin":false},"body":"https://github.com/supasate/connected-react-router/issues/174","created_at":"2018-11-05T20:15:42Z","updated_at":"2018-11-12T14:44:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e555cb73457e3474ef93ce051d05ab7521da768","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/supasate/connected-react-router/pulls/175/commits","review_comments_url":"https://api.github.com/repos/supasate/connected-react-router/pulls/175/comments","review_comment_url":"https://api.github.com/repos/supasate/connected-react-router/pulls/comments{/number}","comments_url":"https://api.github.com/repos/supasate/connected-react-router/issues/175/comments","statuses_url":"https://api.github.com/repos/supasate/connected-react-router/statuses/0c2e818ae6c0702f2c3295815ee1d85c23dd723b","head":{"label":"mattvague:174-router-key-error","ref":"174-router-key-error","sha":"0c2e818ae6c0702f2c3295815ee1d85c23dd723b","user":{"login":"mattvague","id":64985,"node_id":"MDQ6VXNlcjY0OTg1","avatar_url":"https://avatars0.githubusercontent.com/u/64985?v=4","gravatar_id":"","url":"https://api.github.com/users/mattvague","html_url":"https://github.com/mattvague","followers_url":"https://api.github.com/users/mattvague/followers","following_url":"https://api.github.com/users/mattvague/following{/other_user}","gists_url":"https://api.github.com/users/mattvague/gists{/gist_id}","starred_url":"https://api.github.com/users/mattvague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattvague/subscriptions","organizations_url":"https://api.github.com/users/mattvague/orgs","repos_url":"https://api.github.com/users/mattvague/repos","events_url":"https://api.github.com/users/mattvague/events{/privacy}","received_events_url":"https://api.github.com/users/mattvague/received_events","type":"User","site_admin":false},"repo":{"id":156268117,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYyNjgxMTc=","name":"connected-react-router","full_name":"mattvague/connected-react-router","private":false,"owner":{"login":"mattvague","id":64985,"node_id":"MDQ6VXNlcjY0OTg1","avatar_url":"https://avatars0.githubusercontent.com/u/64985?v=4","gravatar_id":"","url":"https://api.github.com/users/mattvague","html_url":"https://github.com/mattvague","followers_url":"https://api.github.com/users/mattvague/followers","following_url":"https://api.github.com/users/mattvague/following{/other_user}","gists_url":"https://api.github.com/users/mattvague/gists{/gist_id}","starred_url":"https://api.github.com/users/mattvague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattvague/subscriptions","organizations_url":"https://api.github.com/users/mattvague/orgs","repos_url":"https://api.github.com/users/mattvague/repos","events_url":"https://api.github.com/users/mattvague/events{/privacy}","received_events_url":"https://api.github.com/users/mattvague/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mattvague/connected-react-router","description":"A Redux binding for React Router v4","fork":true,"url":"https://api.github.com/repos/mattvague/connected-react-router","forks_url":"https://api.github.com/repos/mattvague/connected-react-router/forks","keys_url":"https://api.github.com/repos/mattvague/connected-react-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattvague/connected-react-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattvague/connected-react-router/teams","hooks_url":"https://api.github.com/repos/mattvague/connected-react-router/hooks","issue_events_url":"https://api.github.com/repos/mattvague/connected-react-router/issues/events{/number}","events_url":"https://api.github.com/repos/mattvague/connected-react-router/events","assignees_url":"https://api.github.com/repos/mattvague/connected-react-router/assignees{/user}","branches_url":"https://api.github.com/repos/mattvague/connected-react-router/branches{/branch}","tags_url":"https://api.github.com/repos/mattvague/connected-react-router/tags","blobs_url":"https://api.github.com/repos/mattvague/connected-react-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattvague/connected-react-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattvague/connected-react-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattvague/connected-react-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattvague/connected-react-router/statuses/{sha}","languages_url":"https://api.github.com/repos/mattvague/connected-react-router/languages","stargazers_url":"https://api.github.com/repos/mattvague/connected-react-router/stargazers","contributors_url":"https://api.github.com/repos/mattvague/connected-react-router/contributors","subscribers_url":"https://api.github.com/repos/mattvague/connected-react-router/subscribers","subscription_url":"https://api.github.com/repos/mattvague/connected-react-router/subscription","commits_url":"https://api.github.com/repos/mattvague/connected-react-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattvague/connected-react-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattvague/connected-react-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattvague/connected-react-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattvague/connected-react-router/contents/{+path}","compare_url":"https://api.github.com/repos/mattvague/connected-react-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattvague/connected-react-router/merges","archive_url":"https://api.github.com/repos/mattvague/connected-react-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattvague/connected-react-router/downloads","issues_url":"https://api.github.com/repos/mattvague/connected-react-router/issues{/number}","pulls_url":"https://api.github.com/repos/mattvague/connected-react-router/pulls{/number}","milestones_url":"https://api.github.com/repos/mattvague/connected-react-router/milestones{/number}","notifications_url":"https://api.github.com/repos/mattvague/connected-react-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattvague/connected-react-router/labels{/name}","releases_url":"https://api.github.com/repos/mattvague/connected-react-router/releases{/id}","deployments_url":"https://api.github.com/repos/mattvague/connected-react-router/deployments","created_at":"2018-11-05T19:03:45Z","updated_at":"2018-11-05T19:03:48Z","pushed_at":"2018-11-12T14:14:50Z","git_url":"git://github.com/mattvague/connected-react-router.git","ssh_url":"git@github.com:mattvague/connected-react-router.git","clone_url":"https://github.com/mattvague/connected-react-router.git","svn_url":"https://github.com/mattvague/connected-react-router","homepage":"","size":720,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"supasate:master","ref":"master","sha":"b197430be6315eb8c70f98be96ff67825653add5","user":{"login":"supasate","id":237753,"node_id":"MDQ6VXNlcjIzNzc1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/237753?v=4","gravatar_id":"","url":"https://api.github.com/users/supasate","html_url":"https://github.com/supasate","followers_url":"https://api.github.com/users/supasate/followers","following_url":"https://api.github.com/users/supasate/following{/other_user}","gists_url":"https://api.github.com/users/supasate/gists{/gist_id}","starred_url":"https://api.github.com/users/supasate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supasate/subscriptions","organizations_url":"https://api.github.com/users/supasate/orgs","repos_url":"https://api.github.com/users/supasate/repos","events_url":"https://api.github.com/users/supasate/events{/privacy}","received_events_url":"https://api.github.com/users/supasate/received_events","type":"User","site_admin":false},"repo":{"id":76251826,"node_id":"MDEwOlJlcG9zaXRvcnk3NjI1MTgyNg==","name":"connected-react-router","full_name":"supasate/connected-react-router","private":false,"owner":{"login":"supasate","id":237753,"node_id":"MDQ6VXNlcjIzNzc1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/237753?v=4","gravatar_id":"","url":"https://api.github.com/users/supasate","html_url":"https://github.com/supasate","followers_url":"https://api.github.com/users/supasate/followers","following_url":"https://api.github.com/users/supasate/following{/other_user}","gists_url":"https://api.github.com/users/supasate/gists{/gist_id}","starred_url":"https://api.github.com/users/supasate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supasate/subscriptions","organizations_url":"https://api.github.com/users/supasate/orgs","repos_url":"https://api.github.com/users/supasate/repos","events_url":"https://api.github.com/users/supasate/events{/privacy}","received_events_url":"https://api.github.com/users/supasate/received_events","type":"User","site_admin":false},"html_url":"https://github.com/supasate/connected-react-router","description":"A Redux binding for React Router v4","fork":false,"url":"https://api.github.com/repos/supasate/connected-react-router","forks_url":"https://api.github.com/repos/supasate/connected-react-router/forks","keys_url":"https://api.github.com/repos/supasate/connected-react-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supasate/connected-react-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supasate/connected-react-router/teams","hooks_url":"https://api.github.com/repos/supasate/connected-react-router/hooks","issue_events_url":"https://api.github.com/repos/supasate/connected-react-router/issues/events{/number}","events_url":"https://api.github.com/repos/supasate/connected-react-router/events","assignees_url":"https://api.github.com/repos/supasate/connected-react-router/assignees{/user}","branches_url":"https://api.github.com/repos/supasate/connected-react-router/branches{/branch}","tags_url":"https://api.github.com/repos/supasate/connected-react-router/tags","blobs_url":"https://api.github.com/repos/supasate/connected-react-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supasate/connected-react-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supasate/connected-react-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/supasate/connected-react-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supasate/connected-react-router/statuses/{sha}","languages_url":"https://api.github.com/repos/supasate/connected-react-router/languages","stargazers_url":"https://api.github.com/repos/supasate/connected-react-router/stargazers","contributors_url":"https://api.github.com/repos/supasate/connected-react-router/contributors","subscribers_url":"https://api.github.com/repos/supasate/connected-react-router/subscribers","subscription_url":"https://api.github.com/repos/supasate/connected-react-router/subscription","commits_url":"https://api.github.com/repos/supasate/connected-react-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/supasate/connected-react-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/supasate/connected-react-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/supasate/connected-react-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/supasate/connected-react-router/contents/{+path}","compare_url":"https://api.github.com/repos/supasate/connected-react-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supasate/connected-react-router/merges","archive_url":"https://api.github.com/repos/supasate/connected-react-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supasate/connected-react-router/downloads","issues_url":"https://api.github.com/repos/supasate/connected-react-router/issues{/number}","pulls_url":"https://api.github.com/repos/supasate/connected-react-router/pulls{/number}","milestones_url":"https://api.github.com/repos/supasate/connected-react-router/milestones{/number}","notifications_url":"https://api.github.com/repos/supasate/connected-react-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supasate/connected-react-router/labels{/name}","releases_url":"https://api.github.com/repos/supasate/connected-react-router/releases{/id}","deployments_url":"https://api.github.com/repos/supasate/connected-react-router/deployments","created_at":"2016-12-12T11:49:25Z","updated_at":"2018-11-12T12:40:44Z","pushed_at":"2018-11-12T14:14:51Z","git_url":"git://github.com/supasate/connected-react-router.git","ssh_url":"git@github.com:supasate/connected-react-router.git","clone_url":"https://github.com/supasate/connected-react-router.git","svn_url":"https://github.com/supasate/connected-react-router","homepage":"","size":776,"stargazers_count":1771,"watchers_count":1771,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":198,"mirror_url":null,"archived":false,"open_issues_count":42,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":198,"open_issues":42,"watchers":1771,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/supasate/connected-react-router/pulls/175"},"html":{"href":"https://github.com/supasate/connected-react-router/pull/175"},"issue":{"href":"https://api.github.com/repos/supasate/connected-react-router/issues/175"},"comments":{"href":"https://api.github.com/repos/supasate/connected-react-router/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/supasate/connected-react-router/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/supasate/connected-react-router/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/supasate/connected-react-router/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/supasate/connected-react-router/statuses/0c2e818ae6c0702f2c3295815ee1d85c23dd723b"}},"author_association":"NONE"}}
{"actor":{"display_login":"supasate"}}