Skip to content

Commit fa0a961

Browse files
authored
fix: onscroll handler called after unmount (#100)
1 parent 3db4030 commit fa0a961

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vue-horizontal.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ export default Vue.extend({
108108
mounted() {
109109
this.onScrollDebounce();
110110
},
111+
beforeDestroy() {
112+
clearTimeout(this.debounceId)
113+
},
111114
methods: {
112115
children(): HTMLCollection {
113116
const container = this.$refs.container as Element

0 commit comments

Comments
 (0)