mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge pull request #1143 from shbatm/bug-fix
Fix for #1140 - sendNotification module errors after #1116
This commit is contained in:
commit
d5040c091a
@ -1,5 +1,5 @@
|
|||||||
/* global Log, Loader, Module, config, defaults */
|
/* global Log, Loader, Module, config, defaults */
|
||||||
/* jshint -W020 */
|
/* jshint -W020, esversion: 6 */
|
||||||
|
|
||||||
/* Magic Mirror
|
/* Magic Mirror
|
||||||
* Main System
|
* Main System
|
||||||
@ -89,7 +89,8 @@ var MM = (function() {
|
|||||||
* argument sendTo Module - The module to send the notification to. (optional)
|
* argument sendTo Module - The module to send the notification to. (optional)
|
||||||
*/
|
*/
|
||||||
var sendNotification = function(notification, payload, sender, sendTo) {
|
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)) {
|
if (module !== sender && (!sendTo || module === sendTo)) {
|
||||||
module.notificationReceived(notification, payload, sender);
|
module.notificationReceived(notification, payload, sender);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user