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 oleksiikhr committed Jan 13, 2020
1 parent 79cdf4e commit 14c3ad2
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 14c3ad2

Please sign in to comment.