3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 15:00:00 +00:00
This commit is contained in:
iamshoXy 2024-06-01 16:52:38 +02:00
parent 8a4f7fe0e8
commit 0a11b073e0

View file

@ -32,7 +32,7 @@ export const zTrigger = z
.optional(), .optional(),
}) })
.transform((val, ctx) => { .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; let reverseCondition = val.reverse_condition;
if (!reverseCondition) { if (!reverseCondition) {
@ -51,7 +51,7 @@ export const zTrigger = z
}); });
const zTriggerFromString = zBoundedCharacters(0, 100).transform((val, ctx) => { 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); const parsedCondition = parseCounterConditionString(val);
if (!parsedCondition) { if (!parsedCondition) {
ctx.addIssue({ ctx.addIssue({