Skip to content

Commit 0927750

Browse files
committed
reverting
1 parent a57b2f9 commit 0927750

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/Autocomplete/assets/src/controller.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,23 @@ export default class extends Controller {
6565
}
6666

6767
connect() {
68-
if (!this.tomSelect) {
69-
if (this.urlValue) {
70-
this.tomSelect = this.#createAutocompleteWithRemoteData(
71-
this.urlValue,
72-
this.hasMinCharactersValue ? this.minCharactersValue : null
73-
);
74-
75-
return;
76-
}
68+
if (this.urlValue) {
69+
this.tomSelect = this.#createAutocompleteWithRemoteData(
70+
this.urlValue,
71+
this.hasMinCharactersValue ? this.minCharactersValue : null
72+
);
7773

78-
if (this.optionsAsHtmlValue) {
79-
this.tomSelect = this.#createAutocompleteWithHtmlContents();
74+
return;
75+
}
8076

81-
return;
82-
}
77+
if (this.optionsAsHtmlValue) {
78+
this.tomSelect = this.#createAutocompleteWithHtmlContents();
8379

84-
this.tomSelect = this.#createAutocomplete();
80+
return;
8581
}
8682

83+
this.tomSelect = this.#createAutocomplete();
84+
8785
this.startMutationObserver();
8886
}
8987

0 commit comments

Comments
 (0)