diff --git a/spec-nylas/stores/message-store-spec.coffee b/spec-nylas/stores/message-store-spec.coffee index 9eef64e85..0c2fa722c 100644 --- a/spec-nylas/stores/message-store-spec.coffee +++ b/spec-nylas/stores/message-store-spec.coffee @@ -35,10 +35,18 @@ describe "MessageStore", -> it "should retrieve the focused thread", -> @focus = testThread + MessageStore._thread = null FocusedContentStore.trigger({impactsCollection: -> true}) expect(DatabaseStore.findAll).toHaveBeenCalled() expect(DatabaseStore.findAll.mostRecentCall.args[0]).toBe(Message) + describe "when the thread is already focused", -> + it "should do nothing", -> + @focus = testThread + MessageStore._thread = @focus + FocusedContentStore.trigger({impactsCollection: -> true}) + expect(DatabaseStore.findAll).not.toHaveBeenCalled() + describe "when the thread is unread", -> beforeEach -> @focus = null diff --git a/src/components/menu.cjsx b/src/components/menu.cjsx index c30c34c3d..0e76cbd70 100644 --- a/src/components/menu.cjsx +++ b/src/components/menu.cjsx @@ -22,20 +22,25 @@ class MenuItem extends React.Component - `checked` (optional) Pass a {Boolean} to specify whether the item is checked. ### @propTypes: - divider: React.PropTypes.string + divider: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.bool]) key: React.PropTypes.string selected: React.PropTypes.bool checked: React.PropTypes.bool render: => - if @props.divider? -