diff --git a/templates/standalone/inputs.julius b/templates/standalone/inputs.julius index 10a32bd18..4430d7add 100644 --- a/templates/standalone/inputs.julius +++ b/templates/standalone/inputs.julius @@ -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);