Index: lib/downloader.js |
=================================================================== |
--- a/lib/downloader.js |
+++ b/lib/downloader.js |
@@ -202,17 +202,17 @@ |
* @param {Downloadable} downloadable |
* @return {string} |
*/ |
getDownloadUrl(downloadable) |
{ |
const {addonName, addonVersion, application, applicationVersion, |
platform, platformVersion} = require("info"); |
let url = downloadable.redirectURL || downloadable.url; |
- if (url.indexOf("?") >= 0) |
+ if (url.includes("?")) |
url += "&"; |
else |
url += "?"; |
// We limit the download count to 4+ to keep the request anonymized |
let {downloadCount} = downloadable; |
if (downloadCount > 4) |
downloadCount = "4+"; |
url += "addonName=" + encodeURIComponent(addonName) + |