Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3347094
D10119.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10119.diff
View Options
diff --git a/web/roles/role-actions-menu.react.js b/web/roles/role-actions-menu.react.js
--- a/web/roles/role-actions-menu.react.js
+++ b/web/roles/role-actions-menu.react.js
@@ -5,7 +5,10 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import SWMansionIcon from 'lib/components/swmansion-icon.react.js';
-import { useRoleUserSurfacedPermissions } from 'lib/shared/thread-utils.js';
+import {
+ roleIsDefaultRole,
+ useRoleUserSurfacedPermissions,
+} from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
import { useRoleDeletableAndEditableStatus } from 'lib/utils/role-utils.js';
@@ -26,8 +29,8 @@
const { threadInfo, roleName } = props;
const { pushModal } = useModalContext();
- const defaultRoleID = Object.keys(threadInfo.roles).find(
- roleID => threadInfo.roles[roleID].isDefault,
+ const defaultRoleID = Object.keys(threadInfo.roles).find(roleID =>
+ roleIsDefaultRole(threadInfo.roles[roleID]),
);
invariant(defaultRoleID, 'default role should exist');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 11:07 AM (16 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2570333
Default Alt Text
D10119.diff (1 KB)
Attached To
Mode
D10119: [web] Update existing checks on isDefault in role-actions-menu.reactjs
Attached
Detach File
Event Timeline
Log In to Comment