mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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) {
|
||||
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');
|
||||
}
|
||||
|
||||
if (Number.isInteger(currentDate as unknown as number)) {
|
||||
newDate = moment.unix(currentDate as unknown as number);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user