diff --git a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js index 9184ad30..8233a9b8 100644 --- a/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js +++ b/src/main/resources/au/com/centrumsystems/hudson/plugin/buildpipeline/extension/BuildCardExtension/build-card-template-onclicks.js @@ -84,6 +84,7 @@ const onclickElements = { document.addEventListener("DOMContentLoaded", function () { const parentElement = document.querySelector(".pipelines"); + if (!parentElement) return; Object.entries(onclickElements).forEach(function(entry) { const selector = entry[0];