Skip to content

Commit

Permalink
Append searchParam manually
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinksi committed Jan 3, 2018
1 parent d1b4f89 commit 70c3090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backends/github/implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class GitHub {
.then(files => files.map(({ sha, name, size, download_url, path }) => {
const url = new URL(download_url);
if (url.pathname.match(/.svg$/)) {
url.searchParams.append('sanitize', true);
url.search += (url.search.slice(1) === '' ? '?' : '&') + 'sanitize=true';
}
return { id: sha, name, size, url: url.href, path };
}));
Expand Down

0 comments on commit 70c3090

Please sign in to comment.