Skip to content

Commit b4f9fa7

Browse files
committed
fix: autocomplete can set text to a non-string value
1 parent f30c3de commit b4f9fa7

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/autocomplete/src/Autocomplete.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,10 @@
230230
}
231231
232232
let previousValue = value;
233-
$: if (!combobox && previousValue !== value) {
233+
$: if (previousValue !== value) {
234234
// If the value changes from outside, update the text.
235235
text = getOptionLabel(value);
236236
previousValue = value;
237-
} else if (combobox && previousValue !== value) {
238-
// An update came from the outside.
239-
text = value;
240-
previousValue = value;
241237
} else if (combobox && value !== text) {
242238
// An update came from the user.
243239
value = text;

0 commit comments

Comments
 (0)