Skip to content

Commit

Permalink
Uncaught SyntaxError: redeclaration of const BatchInstallBuilder (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Apr 12, 2023
1 parent 8692d69 commit 59d87dd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/main/webapp/js/snbuilders-support.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Javascript code used by ServiceNow builders.
// Created: April, 2021

const BatchInstallBuilder = {
if (typeof BatchInstallBuilder === "undefined") {
var BatchInstallBuilder = {
adjustVisibility: (builderId, useFile) => {
useFile = useFile || false;
if (useFile) {
Expand All @@ -16,9 +17,11 @@ const BatchInstallBuilder = {
Visibility.setVisibility(document.querySelector('#' + builderId + '-notes'), true);
}
}
}
}

const InstanceScanBuilder = {
if (typeof InstanceScanBuilder === "undefined") {
var InstanceScanBuilder = {
adjustVisibility: (builderId, scanType) => {
switch(scanType) {
case 'fullScan':
Expand Down Expand Up @@ -76,9 +79,11 @@ const InstanceScanBuilder = {
Visibility.show(document.getElementById(builderId + '-suite'));
Visibility.show(document.getElementById(builderId + '-requestBody'));
}
}
}

const Visibility = {
if (typeof Visibility === "undefined") {
var Visibility = {
hide: (element) => {
Visibility.setVisibility(element, false);
},
Expand All @@ -97,5 +102,6 @@ const Visibility = {
}

}
}
}

0 comments on commit 59d87dd

Please sign in to comment.