Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 5ab3ae8

Browse files
author
HarshKhandeparkar
committed
fix: downloads completely fixed
1 parent fa609aa commit 5ab3ae8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/Download/Download.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default class Download extends Component {
3939
</li>
4040
}
4141
{
42-
this.state.downloadURLs.squirrel !== '' &&
42+
this.state.downloadURLs.zip_linux !== '' &&
4343
<li>
4444
<a target="_blank" rel="noreferrer" href={this.state.downloadURLs.zip_linux} className="btn-flat brand-gradient gradient-text">
4545
<i className="fa fa-linux" />
@@ -80,15 +80,15 @@ export default class Download extends Component {
8080
const releaseInfo = JSON.parse(xmlHttp.responseText);
8181

8282
const debAsset = releaseInfo.assets.find((asset) => asset.name.includes('.deb'));
83-
const zipLinuxAsset = releaseInfo.assets.find((asset) => asset.name.includes('.zip'));
83+
const zipLinuxAsset = releaseInfo.assets.find((asset) => asset.name.includes('.zip') && asset.name.includes('linux'));
8484
const squirrelAsset = releaseInfo.assets.find((asset) => asset.name.includes('.exe'));
8585

8686
this.setState({
8787
latestVersion: releaseInfo.tag_name,
8888
downloadURLs: {
89-
deb: debAsset ? debAsset.url : '',
90-
zip_linux: zipLinuxAsset ? zipLinuxAsset.url : '',
91-
squirrel: squirrelAsset ? squirrelAsset.url : '',
89+
deb: debAsset ? debAsset.browser_download_url : '',
90+
zip_linux: zipLinuxAsset ? zipLinuxAsset.browser_download_url : '',
91+
squirrel: squirrelAsset ? squirrelAsset.browser_download_url : '',
9292
}
9393
})
9494
}

0 commit comments

Comments
 (0)