Merge pull request #237 from tycrek/extension-condition

Fix addonLink
This commit is contained in:
Josh Moore 2020-08-24 09:22:20 -06:00 committed by GitHub
commit b751f38c69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,7 +142,7 @@ function fdroidLink(appId) {
* @param {String} link URL to extension WITHOUT trailing slash
*/
function addonLink(link) {
if (!link.includes('addons.mozilla.org')) return;
if (!link.includes('addons.mozilla.org')) return '';
let addonId = link.split('/')[link.split('/').length - 1]
return `![Mozilla Add-on](https://img.shields.io/amo/users/${addonId}?style=flat-square)`;
}