Skip to content

Commit 3f786e9

Browse files
committed
TD-5086: Fixed console errors on LH landing page
1 parent 32364c4 commit 3f786e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

LearningHub.Nhs.WebUI/Views/Shared/_ValidationScriptsPartial.cshtml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
2222
let errorElements = [];
2323
let submitAttempted = false;
24-
document.querySelector('form').onsubmit = () => { submitAttempted = true; }
24+
const form = document.querySelector('form');
25+
if (form) {
26+
form.onsubmit = () => { submitAttempted = true; }
27+
}
2528
2629
$(function () {
2730
$('form').each(function () {

0 commit comments

Comments
 (0)