Skip to content

Commit 6cbda9e

Browse files
authored
fix(ui): bulk editing users throws client-side exception (#11461)
When bulk editing an auth-enabled collection such as users, a client-side exception is thrown. This is because we're trying to access the `disableBulkEdit` property on `undefined`. This is due to hidden, auth-specific fields like `salt` and `hash` lacking an admin config. No test is explicitly needed for this as `"strictNullChecks": true` will throw an error at compile time, once enabled.
1 parent fc42c40 commit 6cbda9e

File tree

1 file changed

+1
-1
lines changed
  • packages/ui/src/elements/FieldSelect

1 file changed

+1
-1
lines changed

packages/ui/src/elements/FieldSelect/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const reduceFields = ({
6767
// escape for a variety of reasons, include ui fields as they have `name`.
6868
if (
6969
(fieldAffectsData(field) || field.type === 'ui') &&
70-
(field.admin.disableBulkEdit ||
70+
(field.admin?.disableBulkEdit ||
7171
field.unique ||
7272
fieldIsHiddenOrDisabled(field) ||
7373
('readOnly' in field && field.readOnly))

0 commit comments

Comments
 (0)