also apply new logic to update method

This commit is contained in:
Lisa P 2015-10-22 21:41:29 +02:00
parent 52cbf7a130
commit e1f5086877

View File

@ -82,7 +82,10 @@ Controller = Ember.Controller.extend
unless @get('broadcasts.content').length
@set('broadcasts.lastBroadcastStatus', '')
else
@set('broadcasts.lastBroadcastStatus', @get('broadcasts.content')[0].category)
if @get('broadcasts.content').findBy('category', 'warning')
@set('broadcasts.lastBroadcastStatus', 'warning')
else if @get('broadcasts.content').findBy('category', 'announcement')
@set('broadcasts.lastBroadcastStatus', 'announcement')
return false
}