mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
fix query selector when checkbox is missing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user