From 54e5b29416093ac76cd83d8017fa9e794dfe94a4 Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Sun, 2 Mar 2025 00:05:01 -0300 Subject: [PATCH] Setting default values for each property of `versions` object - set Docker versions (local/remote) to `null` if they are empty strings, undefined or null; - set other components versions to `"N/A"` if they are empty strings, undefined or null; - set branches and hashes to `null` if they are empty strings, undefined or null; Signed-off-by: RD WebDesign --- scripts/js/footer.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/js/footer.js b/scripts/js/footer.js index 63197d35..a48b09db 100644 --- a/scripts/js/footer.js +++ b/scripts/js/footer.js @@ -485,37 +485,37 @@ function updateVersionInfo() { var versions = [ { name: "Docker Tag", - local: version.docker.local, - remote: version.docker.remote, + local: version.docker.local || null, + remote: version.docker.remote || null, branch: null, hash: null, url: "https://github.com/pi-hole/docker-pi-hole/releases", }, { name: "Core", - local: version.core.local.version, - remote: version.core.remote.version, - branch: version.core.local.branch, - hash: version.core.local.hash, - hash_remote: version.core.remote.hash, + local: version.core.local.version || "N/A", + remote: version.core.remote.version || "N/A", + branch: version.core.local.branch || null, + hash: version.core.local.hash || null, + hash_remote: version.core.remote.hash || null, url: "https://github.com/pi-hole/pi-hole/releases", }, { name: "FTL", - local: version.ftl.local.version, - remote: version.ftl.remote.version, - branch: version.ftl.local.branch, - hash: version.ftl.local.hash, - hash_remote: version.ftl.remote.hash, + local: version.ftl.local.version || "N/A", + remote: version.ftl.remote.version || "N/A", + branch: version.ftl.local.branch || null, + hash: version.ftl.local.hash || null, + hash_remote: version.ftl.remote.hash || null, url: "https://github.com/pi-hole/FTL/releases", }, { name: "Web interface", - local: version.web.local.version, - remote: version.web.remote.version, - branch: version.web.local.branch, - hash: version.web.local.hash, - hash_remote: version.web.remote.hash, + local: version.web.local.version || "N/A", + remote: version.web.remote.version || "N/A", + branch: version.web.local.branch || null, + hash: version.web.local.hash || null, + hash_remote: version.web.remote.hash || null, url: "https://github.com/pi-hole/web/releases", }, ];