CzRger 1 anno fa
parent
commit
8b7ca19248
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/components/vue-drag-resize/vue-drag-resize.js

+ 2 - 2
src/components/vue-drag-resize/vue-drag-resize.js

@@ -238,8 +238,8 @@ export default {
     methods: {
     methods: {
         initResize(notEmit) {
         initResize(notEmit) {
             this.parentElement = this.$el.parentNode;
             this.parentElement = this.$el.parentNode;
-            this.parentWidth = this.parentW ? this.parentW : this.parentElement.clientWidth;
-            this.parentHeight = this.parentH ? this.parentH : this.parentElement.clientHeight;
+            this.parentWidth = this.parentW ? this.parentW : this.parentElement?.clientWidth;
+            this.parentHeight = this.parentH ? this.parentH : this.parentElement?.clientHeight;
             if (this.layout.left || !this.layout.right) {
             if (this.layout.left || !this.layout.right) {
                 this.left = this.layout.left || 0;
                 this.left = this.layout.left || 0;
             } else {
             } else {