Skip to content

Commit

Permalink
Select: Fix memory leak issue (ElemeFE#16463)
Browse files Browse the repository at this point in the history
  • Loading branch information
island205 authored and a631807682 committed Aug 1, 2019
1 parent 2340bbe commit 3189e43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/select/src/option.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@
},
beforeDestroy() {
let index = this.select.cachedOptions.indexOf(this);
if (index > -1) {
this.select.cachedOptions.splice(index, 1);
}
this.select.onOptionDestroy(this.select.options.indexOf(this));
}
};
Expand Down

0 comments on commit 3189e43

Please sign in to comment.