(Optimization) Remove redundant filter call

This commit is contained in:
Luís Miguel 2018-03-23 15:21:20 +00:00 committed by Shawn Erquhart
parent 8e2fefc3f7
commit 2d89cc7bfe

View File

@ -93,7 +93,6 @@ export default class GitHub {
getMedia() {
return this.api.listFiles(this.config.get('media_folder'))
.then(files => files.filter(file => file.type === 'file'))
.then(files => files.map(({ sha, name, size, download_url, path }) => {
const url = new URL(download_url);
if (url.pathname.match(/.svg$/)) {