diff --git a/src/js/diff-updater.js b/src/js/diff-updater.js index e5f248dd4..1e16eafd0 100644 --- a/src/js/diff-updater.js +++ b/src/js/diff-updater.js @@ -49,8 +49,7 @@ const basename = url => { const resolveURL = (path, url) => { try { - const urlAfter = new URL(path, url); - return urlAfter.href; + return new URL(path, url); } catch(_) { } @@ -201,8 +200,11 @@ async function fetchPatchDetailsFromCDNs(assetDetails) { if ( response.ok !== true ) { continue; } const patchText = await response.text(); const patchDetails = parsePatch(patchText); + if ( patchURL.hash.length > 1 ) { + assetDetails.diffName = patchURL.hash.slice(1); + } return { - patchURL, + patchURL: patchURL.href, patchSize: `${(patchText.length / 1000).toFixed(1)} KB`, patchDetails, };