From 680f130724306df3c6833ad339f98b77a355d650 Mon Sep 17 00:00:00 2001
From: florian <f.spreckelsen@inidscale.com>
Date: Tue, 29 Nov 2022 17:13:21 +0100
Subject: [PATCH] FIX: Correct check for existing non-empty config

---
 src/core/js/ext_prop_display.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/core/js/ext_prop_display.js b/src/core/js/ext_prop_display.js
index 576eb11e..68fbb52c 100644
--- a/src/core/js/ext_prop_display.js
+++ b/src/core/js/ext_prop_display.js
@@ -143,7 +143,9 @@ var prop_display = new function ($, getEntityName, getPropertyElements, getPrope
     this.init = async function () {
         console.log("initializing ext_prop_display.js");
         const conf = await this.load_config();
-        if (("${BUILD_MODULE_EXT_PROPERTY_DISPLAY}" == "ENABLED") && conf) {
+        if (("${BUILD_MODULE_EXT_PROPERTY_DISPLAY}" == "ENABLED") && Object.keys(conf).length > 0) {
+            // There are properties to be hidden, so make this clear in HTML body
+            $("body").attr("data-hidden-properties", "true")
             const allTypes = await this._getRecordTypes(conf);
             var entities = this._get_entities_in_view();
             this._unhide_properties(entities, conf, allTypes);
-- 
GitLab