diff --git a/src/webui/www/private/views/log.html b/src/webui/www/private/views/log.html
index 6590f0ef5d94..3fa373fd0f00 100644
--- a/src/webui/www/private/views/log.html
+++ b/src/webui/www/private/views/log.html
@@ -189,7 +189,7 @@
const init = () => {
for (const option of $("logLevelSelect").options)
- option.setAttribute("selected", selectedLogLevels.includes(option.value));
+ option.toggleAttribute("selected", selectedLogLevels.includes(option.value));
selectBox = new vanillaSelectBox("#logLevelSelect", {
maxHeight: 200,