From 009966a5c7151a7e1941fee76341330e40afd91f Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Sat, 9 Jul 2022 16:32:42 +0530 Subject: [PATCH] Fix wrong power level in room permission --- src/app/molecules/room-permissions/RoomPermissions.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/molecules/room-permissions/RoomPermissions.jsx b/src/app/molecules/room-permissions/RoomPermissions.jsx index 989a939..da8720c 100644 --- a/src/app/molecules/room-permissions/RoomPermissions.jsx +++ b/src/app/molecules/room-permissions/RoomPermissions.jsx @@ -237,12 +237,12 @@ function RoomPermissions({ roomId }) { ? permissions[permInfo.parent]?.[permKey] : permissions[permKey]; - if (!permValue) permValue = permInfo.default; + if (permValue === undefined) permValue = permInfo.default; if (typeof permValue === 'number') { powerLevel = permValue; } else if (permKey === 'notifications') { - powerLevel = permValue.room || 50; + powerLevel = permValue.room ?? 50; } return (