rob-balfre / svelte-select

Svelte Select. A select component for Svelte
https://svelte-select-examples.vercel.app
Other
1.25k stars 175 forks source link

Fix null error when using loadOptions and value #509

Closed dlebech closed 1 year ago

dlebech commented 1 year ago

This PR fixes an error that occurs when using a string value together with loadOptions.

Since the initial items list is empty by default, giving a non-empty value prop to the Select component resulted in the error TypeError: Cannot read properties of null (reading 'find')

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
svelte-select ✅ Ready (Inspect) Visit Preview Dec 28, 2022 at 5:24PM (UTC)
rob-balfre commented 1 year ago

@dlebech thanks so much!

rob-balfre commented 1 year ago

@dlebech released in 5.0.2