Skip to content

Commit 064a314

Browse files
authored
Fix PCT Test (#498)
HtmlUnit does not appear to support the `[key]` syntax for setting property IDs in ECMAScript objects. To work around this, use the built- in `crumb.wrap` function from Jenkins core instead.
1 parent dccafc8 commit 064a314

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/webapp/js/build.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ if (rebuildButton) {
99
} else {
1010
fetch(buildUrl, {
1111
method: 'post',
12-
headers: {
13-
[document.head.dataset.crumbHeader]: document.head.dataset.crumbValue
14-
}
12+
headers: crumb.wrap({})
1513
})
1614
.then(res => {
1715
if (!res.ok) {

0 commit comments

Comments
 (0)