fix(dashboard): let settings page load even when no settings stored

This commit is contained in:
rladenson 2022-05-28 15:15:23 -06:00
parent dc7b1a4291
commit 60adb37781

View File

@ -26,9 +26,9 @@
if (savedSettings) {
settings = {...settings, ...savedSettings}
};
}
let descriptions = apiConfig.description_templates;
let descriptions = apiConfig?.description_templates;
async function saveDescriptionTemplates() {
const res = await api().systems("@me").settings.patch({ data: { description_templates: descriptions } });
@ -95,6 +95,7 @@
</Card>
</Col>
</Row>
{#if apiConfig}
<Row>
<Col class="mx-auto" xs={12} lg={11} xl={10}>
<Card class="mb-4">
@ -121,6 +122,7 @@
</Card>
</Col>
</Row>
{/if}
</Container>
<svelte:head>
@ -131,4 +133,4 @@
textarea {
resize: none;
}
</style>
</style>