From c7da3b749ae4a318efd165eaa346157d3ac83a7d Mon Sep 17 00:00:00 2001 From: Spectralitree <72747870+Spectralitree@users.noreply.github.com> Date: Thu, 30 Dec 2021 10:23:03 +0100 Subject: [PATCH] fix: some random error that i cant properly reproduce but still can fix --- src/lib/group/List.svelte | 2 +- src/lib/member/List.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/group/List.svelte b/src/lib/group/List.svelte index 3f258340..6b51713a 100644 --- a/src/lib/group/List.svelte +++ b/src/lib/group/List.svelte @@ -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; diff --git a/src/lib/member/List.svelte b/src/lib/member/List.svelte index a02cfac0..567ee367 100644 --- a/src/lib/member/List.svelte +++ b/src/lib/member/List.svelte @@ -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;