{"action":"opened","number":1025,"pull_request":{"url":"https://api.github.com/repos/vuejs/vue-router/pulls/1025","id":98615736,"html_url":"https://github.com/vuejs/vue-router/pull/1025","diff_url":"https://github.com/vuejs/vue-router/pull/1025.diff","patch_url":"https://github.com/vuejs/vue-router/pull/1025.patch","issue_url":"https://api.github.com/repos/vuejs/vue-router/issues/1025","number":1025,"state":"open","locked":false,"title":"Fix #1012 same route transitions guard execution","user":{"login":"predhme","id":32693,"avatar_url":"https://avatars.githubusercontent.com/u/32693?v=3","gravatar_id":"","url":"https://api.github.com/users/predhme","html_url":"https://github.com/predhme","followers_url":"https://api.github.com/users/predhme/followers","following_url":"https://api.github.com/users/predhme/following{/other_user}","gists_url":"https://api.github.com/users/predhme/gists{/gist_id}","starred_url":"https://api.github.com/users/predhme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/predhme/subscriptions","organizations_url":"https://api.github.com/users/predhme/orgs","repos_url":"https://api.github.com/users/predhme/repos","events_url":"https://api.github.com/users/predhme/events{/privacy}","received_events_url":"https://api.github.com/users/predhme/received_events","type":"User","site_admin":false},"body":"#1012 - Removing the `resolveQueue` function and simply using the `route.matched` and `this.current.matched` as the means for executing the guards resolves this issue.\r\n\r\nConsider the following route:\r\n\r\n```javascript\r\n{\r\n    path: '/users/:id',\r\n    name: UserProfile,\r\n    beforeEnter: function(from, to, next) {\r\n        // fetch user record from API and put into Vuex\r\n        next()\r\n    }\r\n}\r\n```\r\n\r\nIf the application was currently on the route `/users/joe` and was navigating to `/users/paul`, the `beforeEnter` guard for the route would not be executed. Therefore, the `paul` user record would not be fetched and stored in Vuex. Removing the guard execution queue resolution (aka. `resolveQueue`) ensures that the aforementioned use case works. ","created_at":"2016-12-19T18:28:37Z","updated_at":"2016-12-19T18:28:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vuejs/vue-router/pulls/1025/commits","review_comments_url":"https://api.github.com/repos/vuejs/vue-router/pulls/1025/comments","review_comment_url":"https://api.github.com/repos/vuejs/vue-router/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vuejs/vue-router/issues/1025/comments","statuses_url":"https://api.github.com/repos/vuejs/vue-router/statuses/2807ed948253ed546ec1e923cdc73ff55890a2e3","head":{"label":"predhme:patch-1","ref":"patch-1","sha":"2807ed948253ed546ec1e923cdc73ff55890a2e3","user":{"login":"predhme","id":32693,"avatar_url":"https://avatars.githubusercontent.com/u/32693?v=3","gravatar_id":"","url":"https://api.github.com/users/predhme","html_url":"https://github.com/predhme","followers_url":"https://api.github.com/users/predhme/followers","following_url":"https://api.github.com/users/predhme/following{/other_user}","gists_url":"https://api.github.com/users/predhme/gists{/gist_id}","starred_url":"https://api.github.com/users/predhme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/predhme/subscriptions","organizations_url":"https://api.github.com/users/predhme/orgs","repos_url":"https://api.github.com/users/predhme/repos","events_url":"https://api.github.com/users/predhme/events{/privacy}","received_events_url":"https://api.github.com/users/predhme/received_events","type":"User","site_admin":false},"repo":{"id":76883684,"name":"vue-router","full_name":"predhme/vue-router","owner":{"login":"predhme","id":32693,"avatar_url":"https://avatars.githubusercontent.com/u/32693?v=3","gravatar_id":"","url":"https://api.github.com/users/predhme","html_url":"https://github.com/predhme","followers_url":"https://api.github.com/users/predhme/followers","following_url":"https://api.github.com/users/predhme/following{/other_user}","gists_url":"https://api.github.com/users/predhme/gists{/gist_id}","starred_url":"https://api.github.com/users/predhme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/predhme/subscriptions","organizations_url":"https://api.github.com/users/predhme/orgs","repos_url":"https://api.github.com/users/predhme/repos","events_url":"https://api.github.com/users/predhme/events{/privacy}","received_events_url":"https://api.github.com/users/predhme/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/predhme/vue-router","description":"The official router for Vue.js.","fork":true,"url":"https://api.github.com/repos/predhme/vue-router","forks_url":"https://api.github.com/repos/predhme/vue-router/forks","keys_url":"https://api.github.com/repos/predhme/vue-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/predhme/vue-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/predhme/vue-router/teams","hooks_url":"https://api.github.com/repos/predhme/vue-router/hooks","issue_events_url":"https://api.github.com/repos/predhme/vue-router/issues/events{/number}","events_url":"https://api.github.com/repos/predhme/vue-router/events","assignees_url":"https://api.github.com/repos/predhme/vue-router/assignees{/user}","branches_url":"https://api.github.com/repos/predhme/vue-router/branches{/branch}","tags_url":"https://api.github.com/repos/predhme/vue-router/tags","blobs_url":"https://api.github.com/repos/predhme/vue-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/predhme/vue-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/predhme/vue-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/predhme/vue-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/predhme/vue-router/statuses/{sha}","languages_url":"https://api.github.com/repos/predhme/vue-router/languages","stargazers_url":"https://api.github.com/repos/predhme/vue-router/stargazers","contributors_url":"https://api.github.com/repos/predhme/vue-router/contributors","subscribers_url":"https://api.github.com/repos/predhme/vue-router/subscribers","subscription_url":"https://api.github.com/repos/predhme/vue-router/subscription","commits_url":"https://api.github.com/repos/predhme/vue-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/predhme/vue-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/predhme/vue-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/predhme/vue-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/predhme/vue-router/contents/{+path}","compare_url":"https://api.github.com/repos/predhme/vue-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/predhme/vue-router/merges","archive_url":"https://api.github.com/repos/predhme/vue-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/predhme/vue-router/downloads","issues_url":"https://api.github.com/repos/predhme/vue-router/issues{/number}","pulls_url":"https://api.github.com/repos/predhme/vue-router/pulls{/number}","milestones_url":"https://api.github.com/repos/predhme/vue-router/milestones{/number}","notifications_url":"https://api.github.com/repos/predhme/vue-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/predhme/vue-router/labels{/name}","releases_url":"https://api.github.com/repos/predhme/vue-router/releases{/id}","deployments_url":"https://api.github.com/repos/predhme/vue-router/deployments","created_at":"2016-12-19T17:43:31Z","updated_at":"2016-12-19T17:43:34Z","pushed_at":"2016-12-19T18:15:56Z","git_url":"git://github.com/predhme/vue-router.git","ssh_url":"git@github.com:predhme/vue-router.git","clone_url":"https://github.com/predhme/vue-router.git","svn_url":"https://github.com/predhme/vue-router","homepage":"http://router.vuejs.org/","size":4593,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"vuejs:dev","ref":"dev","sha":"37326ca10bbdc664ce77644d2791824cabace7b4","user":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars.githubusercontent.com/u/6128107?v=3","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"repo":{"id":15116946,"name":"vue-router","full_name":"vuejs/vue-router","owner":{"login":"vuejs","id":6128107,"avatar_url":"https://avatars.githubusercontent.com/u/6128107?v=3","gravatar_id":"","url":"https://api.github.com/users/vuejs","html_url":"https://github.com/vuejs","followers_url":"https://api.github.com/users/vuejs/followers","following_url":"https://api.github.com/users/vuejs/following{/other_user}","gists_url":"https://api.github.com/users/vuejs/gists{/gist_id}","starred_url":"https://api.github.com/users/vuejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vuejs/subscriptions","organizations_url":"https://api.github.com/users/vuejs/orgs","repos_url":"https://api.github.com/users/vuejs/repos","events_url":"https://api.github.com/users/vuejs/events{/privacy}","received_events_url":"https://api.github.com/users/vuejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vuejs/vue-router","description":"The official router for Vue.js.","fork":false,"url":"https://api.github.com/repos/vuejs/vue-router","forks_url":"https://api.github.com/repos/vuejs/vue-router/forks","keys_url":"https://api.github.com/repos/vuejs/vue-router/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vuejs/vue-router/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vuejs/vue-router/teams","hooks_url":"https://api.github.com/repos/vuejs/vue-router/hooks","issue_events_url":"https://api.github.com/repos/vuejs/vue-router/issues/events{/number}","events_url":"https://api.github.com/repos/vuejs/vue-router/events","assignees_url":"https://api.github.com/repos/vuejs/vue-router/assignees{/user}","branches_url":"https://api.github.com/repos/vuejs/vue-router/branches{/branch}","tags_url":"https://api.github.com/repos/vuejs/vue-router/tags","blobs_url":"https://api.github.com/repos/vuejs/vue-router/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vuejs/vue-router/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vuejs/vue-router/git/refs{/sha}","trees_url":"https://api.github.com/repos/vuejs/vue-router/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vuejs/vue-router/statuses/{sha}","languages_url":"https://api.github.com/repos/vuejs/vue-router/languages","stargazers_url":"https://api.github.com/repos/vuejs/vue-router/stargazers","contributors_url":"https://api.github.com/repos/vuejs/vue-router/contributors","subscribers_url":"https://api.github.com/repos/vuejs/vue-router/subscribers","subscription_url":"https://api.github.com/repos/vuejs/vue-router/subscription","commits_url":"https://api.github.com/repos/vuejs/vue-router/commits{/sha}","git_commits_url":"https://api.github.com/repos/vuejs/vue-router/git/commits{/sha}","comments_url":"https://api.github.com/repos/vuejs/vue-router/comments{/number}","issue_comment_url":"https://api.github.com/repos/vuejs/vue-router/issues/comments{/number}","contents_url":"https://api.github.com/repos/vuejs/vue-router/contents/{+path}","compare_url":"https://api.github.com/repos/vuejs/vue-router/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vuejs/vue-router/merges","archive_url":"https://api.github.com/repos/vuejs/vue-router/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vuejs/vue-router/downloads","issues_url":"https://api.github.com/repos/vuejs/vue-router/issues{/number}","pulls_url":"https://api.github.com/repos/vuejs/vue-router/pulls{/number}","milestones_url":"https://api.github.com/repos/vuejs/vue-router/milestones{/number}","notifications_url":"https://api.github.com/repos/vuejs/vue-router/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vuejs/vue-router/labels{/name}","releases_url":"https://api.github.com/repos/vuejs/vue-router/releases{/id}","deployments_url":"https://api.github.com/repos/vuejs/vue-router/deployments","created_at":"2013-12-11T19:37:46Z","updated_at":"2016-12-19T17:57:30Z","pushed_at":"2016-12-19T10:31:09Z","git_url":"git://github.com/vuejs/vue-router.git","ssh_url":"git@github.com:vuejs/vue-router.git","clone_url":"https://github.com/vuejs/vue-router.git","svn_url":"https://github.com/vuejs/vue-router","homepage":"http://router.vuejs.org/","size":4593,"stargazers_count":3444,"watchers_count":3444,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":884,"mirror_url":null,"open_issues_count":53,"forks":884,"open_issues":53,"watchers":3444,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/1025"},"html":{"href":"https://github.com/vuejs/vue-router/pull/1025"},"issue":{"href":"https://api.github.com/repos/vuejs/vue-router/issues/1025"},"comments":{"href":"https://api.github.com/repos/vuejs/vue-router/issues/1025/comments"},"review_comments":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/1025/comments"},"review_comment":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vuejs/vue-router/pulls/1025/commits"},"statuses":{"href":"https://api.github.com/repos/vuejs/vue-router/statuses/2807ed948253ed546ec1e923cdc73ff55890a2e3"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":27,"changed_files":1}}
{"actor":{"display_login":"predhme"}}