Skip to content

Commit

Permalink
Fire the route cancel event only when needed. (#1316)
Browse files Browse the repository at this point in the history
Earlier we do it for every route change.
  • Loading branch information
arunoda authored and timneutkens committed Feb 28, 2017
1 parent 96fca5e commit 46b5d6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ export default class Router extends EventEmitter {
}

abortComponentLoad (as) {
this.emit('routeChangeError', new Error('Route Cancelled'), as)
if (this.componentLoadCancel) {
this.emit('routeChangeError', new Error('Route Cancelled'), as)
this.componentLoadCancel()
this.componentLoadCancel = null
}
Expand Down

0 comments on commit 46b5d6a

Please sign in to comment.