Skip to content

Commit 8efe835

Browse files
committed
fix bad ternary precedence
1 parent eb7ad9c commit 8efe835

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

script/tag-name-input.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ customElements.define('tag-name-input', class extends HTMLInputElement {
3232
}
3333
}
3434
this.reportValidity()
35-
this.parentElement.querySelector('.error').textContent = this.validationMessage || value ? 'Valid custom element name!' : ''
35+
const errorEl = this.parentElement.querySelector('.error')
36+
errorEl.textContent = this.validationMessage || (value ? 'Valid custom element name!' : '')
3637
}
3738

3839
}, { extends: 'input' })

0 commit comments

Comments
 (0)