Skip to content

Commit 1a5b163

Browse files
committed
always call original destroy in override (fix #339)
1 parent 4cf893a commit 1a5b163

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/override.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@ export default function (Vue) {
3131

3232
const destroy = Vue.prototype._destroy
3333
Vue.prototype._destroy = function () {
34-
if (!this._isBeingDestroyed) {
35-
if (this.$router) {
36-
this.$router._children.$remove(this)
37-
}
38-
destroy.apply(this, arguments)
34+
if (!this._isBeingDestroyed && this.$router) {
35+
this.$router._children.$remove(this)
3936
}
37+
destroy.apply(this, arguments)
4038
}
4139

4240
// 1.0 only: enable route mixins

0 commit comments

Comments
 (0)