Skip to content

Commit c951a8f

Browse files
authored
feat: use empty array [] as reason for enforceEx() (#496)
1 parent f497769 commit c951a8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/coreEnforcer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ export class CoreEnforcer {
595595
if (explainIndex === -1) {
596596
return [res, []];
597597
}
598-
return [res, p?.policy[explainIndex]];
598+
return [res, p?.policy?.[explainIndex] || []];
599599
}
600600

601601
return res;

0 commit comments

Comments
 (0)