Skip to content

Commit 009966a

Browse files
committed
Fix wrong power level in room permission
1 parent 4427b3b commit 009966a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/molecules/room-permissions/RoomPermissions.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ function RoomPermissions({ roomId }) {
237237
? permissions[permInfo.parent]?.[permKey]
238238
: permissions[permKey];
239239

240-
if (!permValue) permValue = permInfo.default;
240+
if (permValue === undefined) permValue = permInfo.default;
241241

242242
if (typeof permValue === 'number') {
243243
powerLevel = permValue;
244244
} else if (permKey === 'notifications') {
245-
powerLevel = permValue.room || 50;
245+
powerLevel = permValue.room ?? 50;
246246
}
247247
return (
248248
<SettingTile

0 commit comments

Comments
 (0)