diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 7db7171..5137920 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -36,13 +36,14 @@ function get_storage() { } function enable_theme(prefix, name) { - - var theme = document.getElementById("current_theme"); - if (theme) { - theme.href = prefix + "static/"+ name + ".css"; - var st = get_storage(); - st.nntpchan_prefix = prefix; - st.nntpchan_theme = name; + if (prefix && name) { + var theme = document.getElementById("current_theme"); + if (theme) { + theme.href = prefix + "static/"+ name + ".css"; + var st = get_storage(); + st.nntpchan_prefix = prefix; + st.nntpchan_theme = name; + } } }