mirror of https://github.com/vector-im/riot-web
Merge pull request #6853 from videogame-hacker/patch/undefined-3pids
Fix Notifications settings view when threepids is undefinedpull/21833/head
commit
7cd7cf87e3
|
@ -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)}
|
||||||
|
|
Loading…
Reference in New Issue