Skip to content

Commit 44eb399

Browse files
keithamusloisolire
authored andcommitted
use toggleAttribute
1 parent 5301a0a commit 44eb399

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/auto-complete-element.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,7 @@ export default class AutocompleteElement extends HTMLElement {
6060
}
6161

6262
set fetchOnEmpty(fetchOnEmpty: boolean) {
63-
if (fetchOnEmpty) {
64-
this.setAttribute('fetch-on-empty', '')
65-
} else {
66-
this.removeAttribute('fetch-on-empty')
67-
}
63+
this.toggleAttribute('fetch-on-empty', fetchOnEmpty)
6864
}
6965

7066
fetchResult = fragment

0 commit comments

Comments
 (0)