Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
iamshoXy committed Jun 1, 2024
1 parent 8a4f7fe commit 0a11b07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/plugins/Counters/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const zTrigger = z
.optional(),
})
.transform((val, ctx) => {
const ruleName = String(ctx.path[ctx.path.length - 2]).trim();
const ruleName = String(ctx.path[ctx.path.length - 1]).trim();

let reverseCondition = val.reverse_condition;
if (!reverseCondition) {
Expand All @@ -51,7 +51,7 @@ export const zTrigger = z
});

const zTriggerFromString = zBoundedCharacters(0, 100).transform((val, ctx) => {
const ruleName = String(ctx.path[ctx.path.length - 2]).trim();
const ruleName = String(ctx.path[ctx.path.length - 1]).trim();
const parsedCondition = parseCounterConditionString(val);
if (!parsedCondition) {
ctx.addIssue({
Expand Down

0 comments on commit 0a11b07

Please sign in to comment.