Skip to content

Commit d427d93

Browse files
authored
Merge pull request #469 from Sakib25800/fix-config-unwrap
Fix queue page panic on empty oauth config
2 parents c472214 + 5db3a3d commit d427d93

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/queue.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ <h1>
385385
modal.style.display = "block";
386386
});
387387

388+
{% if let Some(client_id) = oauth_client_id %}
388389
rollupContinueButton.addEventListener("click", () => {
389390
const scopes = ["public_repo", "workflow"];
390391

@@ -404,12 +405,13 @@ <h1>
404405
});
405406

406407
const oauthUrl = new URL("https://github.com/login/oauth/authorize");
407-
oauthUrl.searchParams.set("client_id", "{{ oauth_client_id.as_ref().unwrap() }}");
408+
oauthUrl.searchParams.set("client_id", "{{ client_id }}");
408409
oauthUrl.searchParams.set("scope", scopes.join(","));
409410
oauthUrl.searchParams.set("state", state);
410411

411412
window.location.href = oauthUrl.toString();
412413
});
414+
{% endif %}
413415

414416
function formatElapsedTime(ms) {
415417
const totalSeconds = Math.floor(ms / 1000);

0 commit comments

Comments
 (0)