From cbafaf5d5614e255e6a0babf7966e262fcc612bc Mon Sep 17 00:00:00 2001 From: "LAPTOP-KAUR\\race2" Date: Wed, 8 Feb 2017 02:35:09 +0200 Subject: [PATCH] compliments,js handles remoteFile without default daytimes defined --- CHANGELOG.md | 1 + modules/default/compliments/compliments.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eaf47b55..b61657d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Add `anytime` group for Compliments module. +- Compliments module can use remoteFile without default daytime arrays defined - Installer: Use init config.js from config.js.sample. - Switched out `rrule` package for `rrule-alt` and fixes in `ical.js` in order to fix calendar issues. ([#565](https://github.com/MichMich/MagicMirror/issues/565)) - Make mouse events pass through the region fullscreen_above to modules below. diff --git a/modules/default/compliments/compliments.js b/modules/default/compliments/compliments.js index 3cbad1a6..ad3b9e77 100644 --- a/modules/default/compliments/compliments.js +++ b/modules/default/compliments/compliments.js @@ -107,6 +107,8 @@ Module.register("compliments",{ compliments = this.config.compliments.evening; } + if (typeof compliments === 'undefined' ) compliments = new Array(); + if ( this.currentWeatherType in this.config.compliments) { compliments.push.apply(compliments, this.config.compliments[this.currentWeatherType]); }