Skip to content

Commit 6baae18

Browse files
author
Carroll Chiou
authored
Fix expand single failure (#705)
* remove queries from the document url * use URL object instead of parsing
1 parent d3bb209 commit 6baae18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/resources/lib/hudson/test/js/failureSummary.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ function handleShowHideClick(event) {
4343
const id = link.id.replace(/-showlink$/, '').replace(/-hidelink$/, '');
4444

4545
if (link.id.endsWith('-showlink')) {
46-
showFailureSummary(id, document.URL + id.replace(PREFIX, '') + "summary");
46+
// clear the query parameters
47+
const cleanUrl = new URL(document.URL);
48+
cleanUrl.search = "";
49+
showFailureSummary(id, cleanUrl + id.replace(PREFIX, '') + "summary");
4750
} else {
4851
hideFailureSummary(id);
4952
}

0 commit comments

Comments
 (0)