editor: error when duplicating widget while if the clipboard is empty

This commit is contained in:
bordun 2021-03-22 08:29:38 +01:00
parent ff99620746
commit a5dd8f3726
2 changed files with 8 additions and 1 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 1.8.15
- bug fixes
- editor: error when duplicating widget while if the clipboard is empty
## 1.8.14
- bug fixes

View file

@ -589,10 +589,12 @@ class Editor {
pasteWidget(x, y, increment, index, tmp) {
if (!this.selectedWidgets.length || this.clipboard === null) return
if (!this.selectedWidgets.length) return
var clipboard = tmp ? this.tmpClipboard : this.clipboard
if (clipboard === null) return
if (
this.selectedWidgets[0].childrenType === undefined ||
clipboard[0].type === 'tab' && this.selectedWidgets[0].childrenType === 'widget' ||