From 24110bd8808056581adbe29358fc002048e578bb Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Fri, 6 Feb 2026 11:39:20 +0100 Subject: [PATCH] fix query selector when checkbox is missing --- js/layouts/dashboard/dashboard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/layouts/dashboard/dashboard.js b/js/layouts/dashboard/dashboard.js index a36076fa4..6c9c6ad3c 100644 --- a/js/layouts/dashboard/dashboard.js +++ b/js/layouts/dashboard/dashboard.js @@ -86,7 +86,10 @@ class IboDashboard extends HTMLElement { this.setAttribute("data-custom-dashboard", bIsCustom ? "true" : "false"); SetUserPreference(`display_original_dashboard_${this.sId}`, !bIsCustom, true); console.log(document.querySelector('.ibo-dashboard--selector[data-dashboard-id="'+this.sId+'"] input[type="checkbox"]')); - document.querySelector('.ibo-dashboard--selector[data-dashboard-id="'+this.sId+'"] input[type="checkbox"]').checked = bIsCustom; + let checkbox = document.querySelector('.ibo-dashboard--selector[data-dashboard-id="'+this.sId+'"] input[type="checkbox"]'); + if (checkbox) { + checkbox.checked = bIsCustom; + } return this.ReloadFromBackend(bIsCustom); }