bugfix: Default load dashboard when it contains multiple spaces (#318)

This commit is contained in:
James Read 2024-05-23 09:22:08 +01:00 committed by GitHub
parent 8fbbd9b32c
commit 18423a9888
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -97,8 +97,10 @@ function onExecutionFinished (evt) {
}
function showSection (title) {
title = title.replaceAll(' ', '')
for (const section of document.querySelectorAll('section')) {
if (section.title.replace(' ', '') === title) {
if (section.title === title) {
section.style.display = 'block'
} else {
section.style.display = 'none'
@ -174,7 +176,7 @@ function marshalDashboardStructureToHtml (json) {
}
const section = document.createElement('section')
section.title = dashboard.title
section.title = dashboard.title.replaceAll(' ', '')
const def = createFieldset('default', section)
section.appendChild(def)