pets: bug fix for users who haven't been properly converted to pets array system

This commit is contained in:
Tyler Renelle 2013-05-15 09:14:42 +01:00
parent d59f1f6925
commit aef76ae969

View file

@ -177,7 +177,7 @@ viewHelpers = (view) ->
classes += ' color-best'
return classes
view.fn 'ownsPet', (pet, userPets) -> !!userPets && userPets.indexOf(pet) != -1
view.fn 'ownsPet', (pet, userPets) -> _.isArray(userPets) and userPets.indexOf(pet) != -1
view.fn 'friendlyTimestamp', (timestamp) -> moment(timestamp).format('MM/DD h:mm:ss a')