Skip to content

Commit d0de4a1

Browse files
committed
fix possible error when erd is undefined (jbaysolutions#398)
1 parent 67a986e commit d0de4a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/GridLayout.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@
155155
this.eventBus.$off('dragEvent', this.dragEventHandler);
156156
this.eventBus.$destroy();
157157
removeWindowEventListener("resize", this.onWindowResize);
158-
this.erd.uninstall(this.$refs.item);
158+
if (this.erd) {
159+
this.erd.uninstall(this.$refs.item);
160+
}
159161
},
160162
beforeMount: function() {
161163
this.$emit('layout-before-mount', this.layout);

0 commit comments

Comments
 (0)