fix: some random error that i cant properly reproduce but still can fix

This commit is contained in:
Spectralitree 2021-12-30 10:23:03 +01:00
parent 85a758ee15
commit c7da3b749a
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
export let list: Group[];
export let members: Member[];
$: memberlist = members.map(function(member) { return {name: member.name, shortid: member.id, id: member.uuid, display_name: member.display_name}; }).sort((a, b) => a.name.localeCompare(b.name));
$: memberlist = members && members.map(function(member) { return {name: member.name, shortid: member.id, id: member.uuid, display_name: member.display_name}; }).sort((a, b) => a.name.localeCompare(b.name));
let token = localStorage.getItem("pk-token");
let listLoading = true;

View File

@ -18,7 +18,7 @@
export let list: Member[] = [];
export let groups: Group[] = [];
$: grouplist = groups.map(function(group) { return {name: group.name, shortid: group.id, id: group.uuid, members: group.members, display_name: group.display_name}; }).sort((a, b) => a.name.localeCompare(b.name));
$: grouplist = groups && groups.map(function(group) { return {name: group.name, shortid: group.id, id: group.uuid, members: group.members, display_name: group.display_name}; }).sort((a, b) => a.name.localeCompare(b.name));
let token = localStorage.getItem("pk-token");
let listLoading = true;