From d323bc4c0771c0ffd1b22293e9a724d5bdf47a93 Mon Sep 17 00:00:00 2001 From: videogame hacker Date: Wed, 22 Sep 2021 13:16:05 +0100 Subject: [PATCH] Fix Notifications settings view when threepids is undefined Signed-off-by: Charlotte Som --- src/components/views/settings/Notifications.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/settings/Notifications.tsx b/src/components/views/settings/Notifications.tsx index 766ba2c9c0..2f3f7abe4b 100644 --- a/src/components/views/settings/Notifications.tsx +++ b/src/components/views/settings/Notifications.tsx @@ -480,7 +480,7 @@ export default class Notifications extends React.PureComponent { 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 => p.kind === "email" && p.pushkey === e.address)}