Merge pull request #132 from paviro/v2-beta

Fixed mistake that happens when no type is given
This commit is contained in:
Michael Teeuw 2016-04-03 20:43:35 +02:00
commit 864106d336

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)
} }