We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 32364c4 + 3f786e9 commit 9874f1bCopy full SHA for 9874f1b
LearningHub.Nhs.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml
@@ -21,7 +21,10 @@
21
22
let errorElements = [];
23
let submitAttempted = false;
24
- document.querySelector('form').onsubmit = () => { submitAttempted = true; }
+ const form = document.querySelector('form');
25
+ if (form) {
26
+ form.onsubmit = () => { submitAttempted = true; }
27
+ }
28
29
$(function () {
30
$('form').each(function () {
0 commit comments