From 7a40147209fb7016cbed7a16438c61df069839ac Mon Sep 17 00:00:00 2001 From: villhellm Date: Tue, 7 Jul 2020 13:57:19 -0700 Subject: [PATCH] View_Layout null checks --- dist/animated-background.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dist/animated-background.js b/dist/animated-background.js index 31279b5..334665a 100644 --- a/dist/animated-background.js +++ b/dist/animated-background.js @@ -336,6 +336,9 @@ function getEntityState(entity) { //main render function function renderBackgroundHTML() { + if(!View_Layout){ + return; + } var current_config = currentConfig(); var state_url = ""; var temp_enabled = true; @@ -527,6 +530,9 @@ function urlIsVideo(url) { //removes lovelace theme background function removeDefaultBackground(node, current_config) { + if(!View_Layout){ + return; + } var background = 'transparent'; if (current_config.background) { background = current_config.background; @@ -539,6 +545,9 @@ function removeDefaultBackground(node, current_config) { //restores lovelace theme background function restoreDefaultBackground(node) { + if(!View_Layout){ + return; + } View_Layout.style.background = null; node.style.background = null; }