+
diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js
index 2d48f5fe78edb..a0b34d378fae1 100644
--- a/war/src/main/webapp/scripts/hudson-behavior.js
+++ b/war/src/main/webapp/scripts/hudson-behavior.js
@@ -1901,8 +1901,11 @@ function xor(a, b) {
// eslint-disable-next-line no-unused-vars
function replaceDescription(initialDescription, submissionUrl) {
var d = document.getElementById("description");
- d.firstElementChild.nextElementSibling.innerHTML =
- "
";
+ let button = d.firstElementChild.nextElementSibling;
+ if (button !== null) {
+ d.firstElementChild.nextElementSibling.innerHTML =
+ "
";
+ }
let parameters = {};
if (initialDescription !== null && initialDescription !== "") {
parameters["description"] = initialDescription;