From 11b99d8289a50622b4b8e9b3044f42d4069d0e04 Mon Sep 17 00:00:00 2001 From: Neil Brommer Date: Sun, 31 Dec 2017 16:01:03 -0800 Subject: [PATCH] Fix bug with calculating background --- js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 11ad1f0..bf486be 100644 --- a/js/main.js +++ b/js/main.js @@ -28,8 +28,8 @@ function calcBackground() { var period = (24 / backgroundList.length) * 60; // in minutes - var background = backgroundList[Math.floor(total / period)]; - setBackground(background.address, background.dark); + var index = Math.floor(total / period); + setBackground(index); } }