Page MenuHomePhabricator

D10119.id35096.diff
No OneTemporary

D10119.id35096.diff

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/SWMansionIcon.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/thread-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

Mime Type
text/plain
Expires
Sat, Nov 23, 10:35 PM (19 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572647
Default Alt Text
D10119.id35096.diff (1 KB)

Event Timeline