From 60adb377811d7a7901bf48817175630816ac442f Mon Sep 17 00:00:00 2001
From: rladenson <78043712+rladenson@users.noreply.github.com>
Date: Sat, 28 May 2022 15:15:23 -0600
Subject: [PATCH] fix(dashboard): let settings page load even when no settings
 stored
---
 dashboard/src/pages/Settings.svelte | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dashboard/src/pages/Settings.svelte b/dashboard/src/pages/Settings.svelte
index 8cbe0562..cc11a79c 100644
--- a/dashboard/src/pages/Settings.svelte
+++ b/dashboard/src/pages/Settings.svelte
@@ -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 @@
             
         
     
+    {#if apiConfig}
     
         
             
@@ -121,6 +122,7 @@
             
         
     
+    {/if}
 
 
 
@@ -131,4 +133,4 @@
     textarea {
         resize: none;
     }
-
\ No newline at end of file
+