Skip to content

Commit

Permalink
Elements: Show element no data for widget
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenpingol-xibo committed Dec 7, 2023
1 parent acd138b commit f8b7390
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ui/src/layout-editor/viewer.js
Expand Up @@ -1795,7 +1795,7 @@ Viewer.prototype.renderElementContent = function(
// Validate element data
self.validateElementData(
element,
convertedProperties[extendOverrideKey],
elData,
);
}

Expand Down Expand Up @@ -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}`);
Expand All @@ -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 = [];
Expand Down

0 comments on commit f8b7390

Please sign in to comment.