File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,14 @@ export class History {
177
177
}
178
178
179
179
runQueue ( queue , iterator , ( ) => {
180
+ const app = this . router . app
180
181
const postEnterCbs = [ ]
181
- const isValid = ( ) => this . current === route
182
+ const isValid = ( ) => {
183
+ if ( app && app . _isBeingDestroyed ) {
184
+ return false
185
+ }
186
+ return this . current === route
187
+ }
182
188
// wait until async components are resolved before
183
189
// extracting in-component enter guards
184
190
const enterGuards = extractEnterGuards ( activated , postEnterCbs , isValid )
@@ -189,8 +195,8 @@ export class History {
189
195
}
190
196
this . pending = null
191
197
onComplete ( route )
192
- if ( this . router . app ) {
193
- this . router . app . $nextTick ( ( ) => {
198
+ if ( app ) {
199
+ app . $nextTick ( ( ) => {
194
200
postEnterCbs . forEach ( cb => {
195
201
cb ( )
196
202
} )
You can’t perform that action at this time.
0 commit comments