dashboard bugfix - handle initial visit with no saved solutions
This commit is contained in:
parent
48ae4d607e
commit
a390bc7615
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ const colorStrings = [
|
|||
export default function Dashboard() {
|
||||
const { connections, store } = useAppModel();
|
||||
const nextUnsolvedId = createMemo(() => {
|
||||
return connections.find((x) => store.solutions[x.id] === undefined)?.id;
|
||||
return connections.find((x) => (store.solutions ?? [])[x.id] === undefined)?.id;
|
||||
});
|
||||
return (
|
||||
<div>
|
||||
|
@ -78,7 +78,7 @@ export default function Dashboard() {
|
|||
<div class={styles.calendar}>
|
||||
<For each={connections}>
|
||||
{(item) => {
|
||||
const isSolved = store.solutions[item.id] !== undefined;
|
||||
const isSolved = (store.solutions ?? [])[item.id] !== undefined;
|
||||
const date = new Date(item.date);
|
||||
const showHeader = item.id === 1 || date.getDate() === 1;
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue