Fix Notifications settings view when threepids is undefined

Signed-off-by: Charlotte Som <half-kh-hacker@hackery.site>
pull/21833/head
videogame hacker 2021-09-22 13:16:05 +01:00
parent b13fdb698c
commit d323bc4c07
1 changed files with 1 additions and 1 deletions

View File

@ -480,7 +480,7 @@ export default class Notifications extends React.PureComponent<IProps, IState> {
return masterSwitch; return masterSwitch;
} }
const emailSwitches = this.state.threepids.filter(t => t.medium === ThreepidMedium.Email) const emailSwitches = (this.state.threepids || []).filter(t => t.medium === ThreepidMedium.Email)
.map(e => <LabelledToggleSwitch .map(e => <LabelledToggleSwitch
key={e.address} key={e.address}
value={this.state.pushers.some(p => p.kind === "email" && p.pushkey === e.address)} value={this.state.pushers.some(p => p.kind === "email" && p.pushkey === e.address)}