From 6114aeb1186efbc3a1662f51c9319c8446da93aa Mon Sep 17 00:00:00 2001 From: Ruben Pingol <128448242+rubenpingol-xibo@users.noreply.github.com> Date: Fri, 8 Dec 2023 01:48:24 +0800 Subject: [PATCH] Elements: Show element no data for widget (#2259) relates to xibosignage/xibo#3224 --- ui/src/layout-editor/viewer.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/layout-editor/viewer.js b/ui/src/layout-editor/viewer.js index 64995ca17a..c0f2bf00e7 100644 --- a/ui/src/layout-editor/viewer.js +++ b/ui/src/layout-editor/viewer.js @@ -1795,7 +1795,7 @@ Viewer.prototype.renderElementContent = function( // Validate element data self.validateElementData( element, - convertedProperties[extendOverrideKey], + elData, ); } @@ -1969,11 +1969,11 @@ Viewer.prototype.validateElement = function( /** * Validate element data * @param {Object} element - * @param {String} data + * @param {Object} widgetData */ Viewer.prototype.validateElementData = function( element, - data, + widgetData, ) { const $elementContainer = this.DOMObject.find(`#${element.elementId}`); @@ -1989,7 +1989,8 @@ Viewer.prototype.validateElementData = function( $messageContainer.appendTo($elementContainer); } - const isNotValid = !data || typeof data === 'undefined' || data === ''; + const isNotValid = + !widgetData || typeof widgetData === 'undefined' || widgetData === ''; if (isNotValid) { const errorArray = [];