mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Fix bug that fromFormat field did not get used in pre-check #712
This commit is contained in:
@@ -243,9 +243,10 @@ export class DateTime implements INodeType {
|
|||||||
if (currentDate === undefined) {
|
if (currentDate === undefined) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!moment(currentDate as string | number).isValid()) {
|
if (options.fromFormat === undefined && !moment(currentDate as string | number).isValid()) {
|
||||||
throw new Error('The date input format could not be recognized. Please set the "From Format" field');
|
throw new Error('The date input format could not be recognized. Please set the "From Format" field');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Number.isInteger(currentDate as unknown as number)) {
|
if (Number.isInteger(currentDate as unknown as number)) {
|
||||||
newDate = moment.unix(currentDate as unknown as number);
|
newDate = moment.unix(currentDate as unknown as number);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user