Commit 68d6e738 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

fix

parent 3ddd88da
...@@ -459,14 +459,14 @@ ...@@ -459,14 +459,14 @@
class="p-1 text-xs flex rounded transition" class="p-1 text-xs flex rounded transition"
type="button" type="button"
on:click={() => { on:click={() => {
if (info.meta.suggestion_prompts === null) { if ((info?.meta?.suggestion_prompts ?? null) === null) {
info.meta.suggestion_prompts = [{ content: '' }]; info.meta.suggestion_prompts = [{ content: '' }];
} else { } else {
info.meta.suggestion_prompts = null; info.meta.suggestion_prompts = null;
} }
}} }}
> >
{#if info.meta.suggestion_prompts === null} {#if (info?.meta?.suggestion_prompts ?? null) === null}
<span class="ml-2 self-center">{$i18n.t('Default')}</span> <span class="ml-2 self-center">{$i18n.t('Default')}</span>
{:else} {:else}
<span class="ml-2 self-center">{$i18n.t('Custom')}</span> <span class="ml-2 self-center">{$i18n.t('Custom')}</span>
...@@ -474,7 +474,7 @@ ...@@ -474,7 +474,7 @@
</button> </button>
</div> </div>
{#if info.meta.suggestion_prompts !== null} {#if (info?.meta?.suggestion_prompts ?? null) !== null}
<button <button
class="p-1 px-2 text-xs flex rounded transition" class="p-1 px-2 text-xs flex rounded transition"
type="button" type="button"
...@@ -501,7 +501,7 @@ ...@@ -501,7 +501,7 @@
{/if} {/if}
</div> </div>
{#if info.meta.suggestion_prompts} {#if info?.meta?.suggestion_prompts}
<div class="flex flex-col space-y-1 mt-2"> <div class="flex flex-col space-y-1 mt-2">
{#if info.meta.suggestion_prompts.length > 0} {#if info.meta.suggestion_prompts.length > 0}
{#each info.meta.suggestion_prompts as prompt, promptIdx} {#each info.meta.suggestion_prompts as prompt, promptIdx}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment