diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index e86246eec7ae..761020c55700 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -500,7 +500,12 @@ var tooltip; //======================================================== // using tag names in CSS selector makes the processing faster function registerValidator(e) { - e.targetElement = findFollowingTR(e, "validation-error-area").firstChild.nextSibling; + var tr = findFollowingTR(e, "validation-error-area"); + if (!tr || !tr.firstChild) { + console.warn("Couldn't register validator, start element was", e); + return; + } + e.targetElement = tr.firstChild.nextSibling; e.targetUrl = function() { var url = this.getAttribute("checkUrl"); var depends = this.getAttribute("checkDependsOn");