Skip to content

Commit 4e1ddb9

Browse files
MelissaAutumnSancus
authored andcommitted
Make sure we show the download button before we decide if we can auto download or not.
1 parent 8ea43c3 commit 4e1ddb9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

assets/js/common/autodownload.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121

2222
// Only do this on the autodownload page.
2323
if ($('body').attr('id') == 'thunderbird-download') {
24-
if (!canAutodownload()) {
25-
return;
26-
}
2724
var downloadURL;
2825
var downloadChannelRegex = /download_channel=(esr|beta|daily)/;
2926
var downloadChannel = downloadChannelRegex.exec(window.location.search);
@@ -42,6 +39,11 @@
4239
// Remove our display:hidden class
4340
downloadElement.className = '';
4441

42+
// Make sure we've shown the appropriate download link before returning
43+
if (!canAutodownload()) {
44+
return;
45+
}
46+
4547
// Get the platform link via the active downloadChannel
4648
$platformLink = $(`#${downloadChannel} li:visible .download-link`);
4749

0 commit comments

Comments
 (0)