Fixed mistake that happens when no type is given

This commit is contained in:
Paul-Vincent Roll 2016-04-03 20:41:03 +02:00
parent f931316dc8
commit 5a612e792e

View File

@ -94,8 +94,8 @@ Module.register('alert',{
}, },
notificationReceived: function(notification, payload, sender) { notificationReceived: function(notification, payload, sender) {
if (typeof payload.type === 'undefined') { payload.type = "alert"; }
if (notification === 'SHOW_ALERT') { if (notification === 'SHOW_ALERT') {
if (typeof payload.type === 'undefined') { payload.type = "alert"; }
if (payload.type == "alert"){ if (payload.type == "alert"){
this.show_alert(payload, sender) this.show_alert(payload, sender)
} }