sanity check for reactive labels
This commit is contained in:
parent
511a3fef7b
commit
6c680a109c
@ -156,6 +156,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
// setup reactive labels
|
||||
Array.from(document.querySelectorAll('.reactive-label')).forEach(function(label) {
|
||||
var input = document.querySelector('#' + label.getAttribute('for'));
|
||||
if (!input) {
|
||||
console.error('No input found for ReactiveLabel! Targeted input: \'#%s\'', label.getAttribute('for'));
|
||||
return false;
|
||||
}
|
||||
|
||||
var parent = label.parentElement;
|
||||
var type = input.getAttribute('type');
|
||||
var isFileInput = /file/i.test(type);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user