mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-09 12:51:50 +08:00
fix(sheet-toolbar): Make robust against mail view null names (Sentry 3861)
This commit is contained in:
parent
408e96945c
commit
86fc3a4c2b
1 changed files with 2 additions and 2 deletions
|
@ -44,11 +44,11 @@ class ToolbarBack extends React.Component
|
||||||
CategoryStore ?= require './flux/stores/category-store'
|
CategoryStore ?= require './flux/stores/category-store'
|
||||||
FocusedMailViewStore ?= require './flux/stores/focused-mail-view-store'
|
FocusedMailViewStore ?= require './flux/stores/focused-mail-view-store'
|
||||||
@state =
|
@state =
|
||||||
categoryName: FocusedMailViewStore.mailView().name
|
categoryName: FocusedMailViewStore.mailView()?.name
|
||||||
|
|
||||||
componentDidMount: =>
|
componentDidMount: =>
|
||||||
@_unsubscriber = FocusedMailViewStore.listen =>
|
@_unsubscriber = FocusedMailViewStore.listen =>
|
||||||
@setState(categoryName: FocusedMailViewStore.mailView().name)
|
@setState(categoryName: FocusedMailViewStore.mailView()?.name)
|
||||||
|
|
||||||
componentWillUnmount: =>
|
componentWillUnmount: =>
|
||||||
@_unsubscriber() if @_unsubscriber
|
@_unsubscriber() if @_unsubscriber
|
||||||
|
|
Loading…
Add table
Reference in a new issue