Commit 46b5d6a4 authored by Arunoda Susiripala's avatar Arunoda Susiripala Committed by Tim Neutkens

Fire the route cancel event only when needed. (#1316)

Earlier we do it for every route change.
parent 96fca5e2
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment