Skip to content

Commit 5cd28d2

Browse files
committed
Fix fetching on load, only load if oldValue existed
1 parent 0681cb2 commit 5cd28d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class RemoteInputElement extends HTMLElement {
99
return ['src']
1010
}
1111

12-
attributeChangedCallback(name: string) {
13-
if (name === 'src') {
12+
attributeChangedCallback(name: string, oldValue: string) {
13+
if (oldValue && name === 'src') {
1414
this.fetchResults(false)
1515
}
1616
}

0 commit comments

Comments
 (0)