fix(mail-important): Fix broken specs when getStandardCategory('important') returns null

This commit is contained in:
Ben Gotow 2015-09-08 13:45:40 -07:00
parent 6c881f4f64
commit 15f5a6899f

View file

@ -32,7 +32,9 @@ class MailImportantIcon extends React.Component
render: =>
return false unless @state.showing
importantId = CategoryStore.getStandardCategory('important').id
importantId = CategoryStore.getStandardCategory('important')?.id
return false unless importantId
isImportant = _.findWhere(@props.thread.labels, {id: importantId})?
activeClassname = if isImportant then "active" else ""