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.
This commit is contained in:
@@ -67,7 +67,7 @@ const reduceFields = ({
|
||||
// escape for a variety of reasons, include ui fields as they have `name`.
|
||||
if (
|
||||
(fieldAffectsData(field) || field.type === 'ui') &&
|
||||
(field.admin.disableBulkEdit ||
|
||||
(field.admin?.disableBulkEdit ||
|
||||
field.unique ||
|
||||
fieldIsHiddenOrDisabled(field) ||
|
||||
('readOnly' in field && field.readOnly))
|
||||
|
||||
Reference in New Issue
Block a user