fix(Schedule Trigger Node): Default to 0 minute if falsy on hourly run (#9146)

This commit is contained in:
Michael Kret
2024-04-18 12:57:36 +03:00
committed by GitHub
parent 1c7acbb629
commit d756609826
2 changed files with 20 additions and 8 deletions

View File

@@ -81,3 +81,13 @@ export function convertToUnixFormat(interval: IDataObject) {
}
interval.expression = expression.join(' ');
}
export const addFallbackValue = <T>(enabled: boolean, fallback: T) => {
if (enabled) {
return (value: T) => {
if (!value) return fallback;
return value;
};
}
return (value: T) => value;
};