Fix rebase/refactor typos

Fixes the bank buttons which weren't getting their handlers registered
thanks to the `null` making it go down the wrong path, and makes sure to
use the institution id from the object passed in, not the institution_id
variable from the global scope which is only defined for renewals.

Resolves #10501
This commit is contained in:
Dave Shoreman 2025-01-13 16:23:18 +00:00
parent 7a538af7b3
commit 00d9c61651
No known key found for this signature in database
GPG Key ID: C920D1D63709F443
1 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@
clone.classList.replace('ob-list-institution', 'ob-history-option');
clone.querySelector('.ob-span-text').innerText = `${max_history} days`;
url.searchParams.set('institution_id', institutionId);
url.searchParams.set('institution_id', institution.id);
// When we come from the renew button we need to replace the country flag
if (skippedSelect) {
@ -101,7 +101,7 @@
new institutionSelector(institutions, 'institution-modal-content', config);
if (null !== institutionId && !failedReason) {
if ('' !== institutionId && !failedReason) {
createSelectionUI(
document.querySelector('.ob-institution'),
institutions.find(i => i.id == institutionId),