Properly detect if user is logged in for broadcasts

This commit is contained in:
Piotr Sarnacki 2013-09-24 14:17:07 +02:00
parent 6c04d5adbd
commit 1ea19a7cbd

View File

@ -17,8 +17,8 @@ Travis.FlashController = Ember.ArrayController.extend
).property('broadcasts.isLoaded', 'broadcasts.length')
broadcasts: (->
if @get('currentUser') then Travis.Broadcast.find() else Ember.A()
).property('currentUser')
if @get('currentUser.id') then Travis.Broadcast.find() else Ember.A()
).property('currentUser.id')
loadFlashes: (msgs) ->
for msg in msgs