diff --git a/examples/mobile.html b/examples/mobile.html index 1334b1401..88a10e628 100644 --- a/examples/mobile.html +++ b/examples/mobile.html @@ -75,7 +75,13 @@ if (theme == 'default') { theme = 'cxd'; } - document.querySelector(`link[title=${theme}]`).disabled = false; + + const linkDom = document.querySelector(`link[title=${theme}]`); + + if (linkDom) { + linkDom.disabled = false; + } + if (theme === 'dark') { document.querySelector('body').classList.add('dark'); }