mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-07 14:39:25 +08:00
fix(acl): add optional chaining to prevent potential null/undefined error in uiButtonSchemasBlacklist check
This commit is contained in:
parent
bf624922f0
commit
bea0a2c524
@ -321,7 +321,7 @@ export const ACLActionProvider = (props) => {
|
||||
() => actionPath && parseAction(actionPath, { schema, recordPkValue }),
|
||||
[parseAction, actionPath, schema, recordPkValue],
|
||||
);
|
||||
if (uiButtonSchemasBlacklist.includes(currentUid)) {
|
||||
if (uiButtonSchemasBlacklist?.includes(currentUid)) {
|
||||
return <ACLActionParamsContext.Provider value={false}>{props.children}</ACLActionParamsContext.Provider>;
|
||||
}
|
||||
if (!actionPath) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user