Commit abefadb3 by Torkel Ödegaard

fix: preloader element issue

parent 5eef2fe0
......@@ -275,7 +275,10 @@
document.head.insertBefore(myCSS, document.head.childNodes[document.head.childNodes.length - 1].nextSibling);
// switch loader to show all has loaded
window.onload = function() {
document.getElementsByClassName("preloader")[0].className = "preloader preloader--done";
var preloader = document.getElementsByClassName("preloader");
if (preloader.length) {
preloader[0].className = "preloader preloader--done";
}
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment