Skip to content

Commit 5a42ba8

Browse files
committed
Avoid removing attriute on setter
1 parent bb7a69f commit 5a42ba8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

include-fragment-element.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,15 @@ export default class IncludeFragmentElement extends HTMLElement {
6262
}
6363

6464
set src(val) {
65-
if (val) {
66-
this.setAttribute('src', val)
67-
} else {
68-
this.removeAttribute('src')
69-
}
65+
this.setAttribute('src', val)
7066
}
7167

7268
get accept() {
7369
return this.getAttribute('accept')
7470
}
7571

7672
set accept(val) {
77-
if (val) {
78-
this.setAttribute('accept', val)
79-
} else {
80-
this.removeAttribute('accept')
81-
}
73+
this.setAttribute('accept', val)
8274
}
8375

8476
get data() {

0 commit comments

Comments
 (0)