Skip to content

Commit 5e8942e

Browse files
committed
Fix type coercion in diff viewer
The first file has rank 0, which by type coercion is false and this was not downloadable after switching the tab to another file and back.
1 parent 68bb8cc commit 5e8942e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/public/js/domjudge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ function initDiffEditor(editorId) {
13401340
const download = wrapper.find(".download")[0];
13411341
const edit = wrapper.find(".edit")[0];
13421342
const updateTabRank = (rank) => {
1343-
if (rank) {
1343+
if (rank !== undefined) {
13441344
let url = new URL(download.href);
13451345
url.searchParams.set("fetch", rank);
13461346
enableButton(download, url);

0 commit comments

Comments
 (0)