From 4d43fbfe359bceaee956461403d29ec3ef99e049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mauro=20Ferr=C3=A3o?= Date: Tue, 17 Oct 2023 15:02:00 +0100 Subject: [PATCH] Elements: duplicate group doesn't work (#2161) relates to xibosignage/xibo#3190 --- ui/src/layout-editor/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/src/layout-editor/main.js b/ui/src/layout-editor/main.js index 1c3e3103f8..ffe9157c45 100644 --- a/ui/src/layout-editor/main.js +++ b/ui/src/layout-editor/main.js @@ -4841,8 +4841,11 @@ lD.addElementsToWidget = function( Math.floor(Math.random() * 1000000); // Add top layer to the group properties - if (element.groupId) { - element.groupProperties.layer = topLayer; + if ( + element.groupId + ) { + (element.groupProperties) && + (element.groupProperties.layer = topLayer); } else { // Add element to the top layer element.layer = topLayer;