From 868daef0f0566bb12e637c2aead510bab8071988 Mon Sep 17 00:00:00 2001 From: shbatm <18057952+shbatm@users.noreply.github.com> Date: Wed, 17 Jan 2018 09:49:17 -0600 Subject: [PATCH] Fix for #1140 - sendNotification module errors after #1116 --- js/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 4bd45a7f..9ee3f789 100644 --- a/js/main.js +++ b/js/main.js @@ -1,5 +1,5 @@ /* global Log, Loader, Module, config, defaults */ -/* jshint -W020 */ +/* jshint -W020, esversion: 6 */ /* Magic Mirror * Main System @@ -89,7 +89,8 @@ var MM = (function() { * argument sendTo Module - The module to send the notification to. (optional) */ var sendNotification = function(notification, payload, sender, sendTo) { - for (var module of modules) { + for (var m in modules) { + var module = modules[m]; if (module !== sender && (!sendTo || module === sendTo)) { module.notificationReceived(notification, payload, sender); }