Skip to content

Commit 42b1321

Browse files
committed
fix(policy): correct regex match case structure in PolicyEngine
1 parent 144b0dc commit 42b1321

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/policy-engine.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -709,11 +709,13 @@ export class PolicyEngine {
709709
};
710710

711711
case 'regex_match':
712-
const regex = new RegExp(condition.value);
713-
return {
714-
passed: regex.test(String(fieldValue)),
715-
currentValue: fieldValue
716-
};
712+
{
713+
const regex = new RegExp(condition.value);
714+
return {
715+
passed: regex.test(String(fieldValue)),
716+
currentValue: fieldValue
717+
};
718+
}
717719

718720
case 'exists':
719721
return {

0 commit comments

Comments
 (0)