Skip to content
Snippets Groups Projects
Commit 75053b52 authored by Christopher Willis-Ford's avatar Christopher Willis-Ford
Browse files

Don't use Object.keys()

parent b9dc953d
No related branches found
No related tags found
No related merge requests found
...@@ -58,20 +58,20 @@ class TipsLibrary extends React.PureComponent { ...@@ -58,20 +58,20 @@ class TipsLibrary extends React.PureComponent {
}); });
} }
render () { render () {
const decksLibraryThumbnailData = Object.entries(decksLibraryContent) const decksLibraryThumbnailData = Object.keys(decksLibraryContent)
.filter(([, item]) => .filter(id =>
// Scratch Desktop doesn't want tutorials with `requiredProjectId` // Scratch Desktop doesn't want tutorials with `requiredProjectId`
notScratchDesktop() || !item.hasOwnProperty('requiredProjectId') notScratchDesktop() || !decksLibraryContent[id].hasOwnProperty('requiredProjectId')
) )
.map(([id, item]) => ({ .map(id => ({
rawURL: item.img, rawURL: decksLibraryContent[id].img,
id: id, id: id,
name: item.name, name: decksLibraryContent[id].name,
featured: true, featured: true,
tags: item.tags, tags: decksLibraryContent[id].tags,
urlId: item.urlId, urlId: decksLibraryContent[id].urlId,
requiredProjectId: item.requiredProjectId, requiredProjectId: decksLibraryContent[id].requiredProjectId,
hidden: item.hidden || false hidden: decksLibraryContent[id].hidden || false
})); }));
if (!this.props.visible) return null; if (!this.props.visible) return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment