Skip to content

Commit dc2600d

Browse files
committed
fix: prevent multiple init()
1 parent 1e26380 commit dc2600d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/v-tooltip/src/components/Popper.js

+3
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ export default () => ({
294294
},
295295

296296
created () {
297+
this.$_isDisposed = true
297298
this.randomId = `popper_${[Math.random(), Date.now()].map(n => n.toString(36).substring(2, 10)).join('_')}`
298299
},
299300

@@ -336,6 +337,7 @@ export default () => ({
336337
},
337338

338339
init () {
340+
if (!this.$_isDisposed) return
339341
this.$_isDisposed = false
340342
this.isMounted = false
341343
this.$_events = []
@@ -359,6 +361,7 @@ export default () => ({
359361
},
360362

361363
dispose () {
364+
if (this.$_isDisposed) return
362365
this.$_isDisposed = true
363366
this.$_removeEventListeners()
364367
this.hide({ skipDelay: true })

0 commit comments

Comments
 (0)