From b7a837d84d0cf7cac1141c36f594157e482a2994 Mon Sep 17 00:00:00 2001 From: Chareice Date: Thu, 11 Jan 2024 10:47:49 +0800 Subject: [PATCH] fix: acl test --- packages/core/acl/src/acl-available-strategy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/acl/src/acl-available-strategy.ts b/packages/core/acl/src/acl-available-strategy.ts index f4b45cab4e..2618611d0f 100644 --- a/packages/core/acl/src/acl-available-strategy.ts +++ b/packages/core/acl/src/acl-available-strategy.ts @@ -69,7 +69,7 @@ export class ACLAvailableStrategy { const namespace = this.getNamespace(resourceName); - if (Object.prototype.hasOwnProperty.call(this.actionsAsObject?.[namespace], actionName)) { + if (Object.prototype.hasOwnProperty.call(this.actionsAsObject?.[namespace] || {}, actionName)) { const predicateName = this.actionsAsObject[namespace][actionName]; if (predicateName) { return lodash.cloneDeep(predicate[predicateName]);