diff --git a/modules/default/alert/README.md b/modules/default/alert/README.md index 81c133db..ced23b42 100644 --- a/modules/default/alert/README.md +++ b/modules/default/alert/README.md @@ -78,7 +78,7 @@ self.sendNotification("SHOW_ALERT", {type: "notification"}); For alerts use: ``` -self.sendNotification("SHOW_ALERT", {type: "alert"}); +self.sendNotification("SHOW_ALERT", {}); ``` ### Notification params diff --git a/modules/default/alert/alert.js b/modules/default/alert/alert.js index 03fcf1c2..dec635c1 100644 --- a/modules/default/alert/alert.js +++ b/modules/default/alert/alert.js @@ -94,6 +94,7 @@ Module.register('alert',{ }, notificationReceived: function(notification, payload, sender) { + if (typeof payload.type === 'undefined') { payload.type = "alert"; } if (notification === 'SHOW_ALERT') { if (payload.type == "alert"){ this.show_alert(payload, sender)