From d1be2d2131714d023a22a6ffc0a94de651dc7f4e Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 20 Nov 2026 12:36:23 +0200 Subject: [PATCH] Trello import of a file with no members no longer does nothing. trelloGetMembersToMap called data.members.forEach, so a Trello board file without a members list - a board nobody else is on, or one written by another tool - threw in the browser, and Import and Import without mapping members silently did nothing. No members is nobody to map, as the WeKan import's mapper already reads it. Thanks to xet7 ! --- client/components/import/trelloMembersMapper.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/components/import/trelloMembersMapper.js b/client/components/import/trelloMembersMapper.js index d08bb15feb..10ad29c06d 100644 --- a/client/components/import/trelloMembersMapper.js +++ b/client/components/import/trelloMembersMapper.js @@ -4,7 +4,10 @@ export function trelloGetMembersToMap(data) { // we will work on the list itself (an ordered array of objects) when a // mapping is done, we add a 'wekan' field to the object representing the // imported member - const membersToMap = data.members; + // A Trello file may have no members (an export of a board nobody else is + // on): there is then nobody to map, not an error. Without the fallback the + // forEach below threw and the Import button silently did nothing. + const membersToMap = Array.isArray(data.members) ? data.members : []; // auto-map based on username membersToMap.forEach(importedMember => { const wekanUser = ReactiveCache.getUser({ username: importedMember.username });