Page MenuHomePhabricator

D10118.id34425.diff
No OneTemporary

D10118.id34425.diff

diff --git a/native/roles/role-panel-entry.react.js b/native/roles/role-panel-entry.react.js
--- a/native/roles/role-panel-entry.react.js
+++ b/native/roles/role-panel-entry.react.js
@@ -6,6 +6,7 @@
import { View, Text, TouchableOpacity, Platform } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
+import { roleIsDefaultRole } from 'lib/shared/thread-utils.js';
import type { UserSurfacedPermission } from 'lib/types/thread-permission-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
@@ -39,8 +40,8 @@
);
invariant(existingRoleID, 'Role ID must exist for an existing role');
- 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 ID must exist');

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 29, 1:45 PM (9 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2732430
Default Alt Text
D10118.id34425.diff (955 B)

Event Timeline