diff --git a/src/routes/(app)/workspace/models/edit/+page.svelte b/src/routes/(app)/workspace/models/edit/+page.svelte index 128501eb7..9e11c65d9 100644 --- a/src/routes/(app)/workspace/models/edit/+page.svelte +++ b/src/routes/(app)/workspace/models/edit/+page.svelte @@ -459,14 +459,14 @@ class="p-1 text-xs flex rounded transition" type="button" on:click={() => { - if (info.meta.suggestion_prompts === null) { + if ((info?.meta?.suggestion_prompts ?? null) === null) { info.meta.suggestion_prompts = [{ content: '' }]; } else { info.meta.suggestion_prompts = null; } }} > - {#if info.meta.suggestion_prompts === null} + {#if (info?.meta?.suggestion_prompts ?? null) === null} {$i18n.t('Default')} {:else} {$i18n.t('Custom')} @@ -474,7 +474,7 @@ - {#if info.meta.suggestion_prompts !== null} + {#if (info?.meta?.suggestion_prompts ?? null) !== null}