thecodealer / vue-panzoom

Vue plugin to zoom/pan dom elements
MIT License
89 stars 20 forks source link

reading 'on' problem #45

Open bluelemonade opened 1 year ago

bluelemonade commented 1 year ago

when the component is initalized I got

TypeError: Cannot read properties of undefined (reading 'on')
    at Proxy.attachEvents (vue-panzoom.esm.js:68:1)
    at Proxy.mounted (vue-panzoom.esm.js:32:1)
    at eval (runtime-core.esm-bundler.js:2739:1)
    at callWithErrorHandling (runtime-core.esm-bundler.js:157:1)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:1)
    at hook.__weh.hook.__weh (runtime-core.esm-bundler.js:2713:1)
    at flushPostFlushCbs (runtime-core.esm-bundler.js:343:1)
    at flushJobs (runtime-core.esm-bundler.js:397:1)

when I load the component inside a router view the first time it is broken, when using another view before the component shows the component!

is there a workaround to fix this issue?