mirror of
https://github.com/wekan/wekan.git
synced 2026-11-20 09:45:04 -05:00
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 !
This commit is contained in:
1 parent
5d8c4a7635
commit
d1be2d2131
1 file changed
+4
-1
@@ -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 });
|
||||
|
||||
Reference in new issue
Block a user