Try to fix Trello import Attachment and links not defined.

Thanks to akhudushin, hatl, 2447254731 and xet7 !

Fixes #4418
This commit is contained in:
Lauri Ojansivu 2022-04-06 17:54:20 +03:00
parent e7a11c5733
commit 5eca3de00f

View file

@ -1,3 +1,5 @@
import Attachments from "./attachments";
const DateString = Match.Where(function(dateAsString) { const DateString = Match.Where(function(dateAsString) {
check(dateAsString, String); check(dateAsString, String);
return moment(dateAsString, moment.ISO_8601).isValid(); return moment(dateAsString, moment.ISO_8601).isValid();
@ -452,7 +454,8 @@ export class TrelloCreator {
} }
}); });
if (links.length) { if (links !== undefined) {
if (links.length !== undefined) {
let desc = cardToCreate.description.trim(); let desc = cardToCreate.description.trim();
if (desc) { if (desc) {
desc += '\n\n'; desc += '\n\n';
@ -468,6 +471,7 @@ export class TrelloCreator {
}); });
} }
} }
}
result.push(cardId); result.push(cardId);
}); });
return result; return result;