Skip to content

Commit

Permalink
feat: use empty array [] as reason for enforceEx() (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
HashCookie authored Jan 10, 2025
1 parent f497769 commit c951a8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coreEnforcer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ export class CoreEnforcer {
if (explainIndex === -1) {
return [res, []];
}
return [res, p?.policy[explainIndex]];
return [res, p?.policy?.[explainIndex] || []];
}

return res;
Expand Down

0 comments on commit c951a8f

Please sign in to comment.