fix(frontend): Make sure AppSelect items are an array (#1144)

* fix(frontend): Make sure AppSelect items are an array

* fix(frontend): restore placeholder
This commit is contained in:
Faton Ramadani
2023-01-23 05:37:38 -08:00
committed by GitHub
parent fedb9fe74c
commit 24b1fa0ae3
2 changed files with 2 additions and 3 deletions
@@ -8,7 +8,6 @@
import Select from 'svelte-select'
import AppConnect from './AppConnect.svelte'
import ResourceEditor from './ResourceEditor.svelte'
import { truncate } from '$lib/utils'
const dispatch = createEventDispatcher()
let resources: Resource[] = []
@@ -1,5 +1,5 @@
<script lang="ts">
import { createEventDispatcher, getContext } from 'svelte'
import { getContext } from 'svelte'
import Select from 'svelte-select'
import type { AppInput } from '../../inputType'
import type { Output } from '../../rx'
@@ -46,7 +46,7 @@
e?.stopPropagation()
window.dispatchEvent(new Event('pointerup'))
}}
{items}
items={Array.isArray(items) ? items : []}
{value}
placeholder="Select an item"
on:click={() => {