Skip to content

Commit 4582b56

Browse files
committed
Quick fix #154
1 parent 1dc671b commit 4582b56

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
node_modules
33
cdn_status.js
44
ww$$$.json
5+
package-lock.json

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mixins/overlay.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@ export default {
2323
let main = this.$props.sub === this.$props.data
2424

2525
this.meta_info()
26-
this._$emit = this.$emit
27-
this.$emit = this.custom_event
26+
27+
// TODO(1): quick fix for vue2, in vue3 we use 3rd party emit
28+
try {
29+
new Function('return ' + this.$emit)()
30+
this._$emit = this.$emit
31+
this.$emit = this.custom_event
32+
} catch(e) {
33+
return
34+
}
2835

2936
this._$emit('new-grid-layer', {
3037
name: this.$options.name,

0 commit comments

Comments
 (0)