null isn't typeof undefined

This commit is contained in:
fewieden 2017-04-22 12:25:51 +02:00
parent 778107aae9
commit c4282a3593

View File

@ -96,7 +96,7 @@ Module.register("compliments", {
*/ */
complimentArray: function() { complimentArray: function() {
var hour = moment().hour(); var hour = moment().hour();
var compliments = null; var compliments;
if (hour >= 3 && hour < 12 && this.config.compliments.hasOwnProperty("morning")) { if (hour >= 3 && hour < 12 && this.config.compliments.hasOwnProperty("morning")) {
compliments = this.config.compliments.morning.slice(0); compliments = this.config.compliments.morning.slice(0);