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 {
});
}
render () {
const decksLibraryThumbnailData = Object.entries(decksLibraryContent)
.filter(([, item]) =>
const decksLibraryThumbnailData = Object.keys(decksLibraryContent)
.filter(id =>
// Scratch Desktop doesn't want tutorials with `requiredProjectId`
notScratchDesktop() || !item.hasOwnProperty('requiredProjectId')
notScratchDesktop() || !decksLibraryContent[id].hasOwnProperty('requiredProjectId')
)
.map(([id, item]) => ({
rawURL: item.img,
.map(id => ({
rawURL: decksLibraryContent[id].img,
id: id,
name: item.name,
name: decksLibraryContent[id].name,
featured: true,
tags: item.tags,
urlId: item.urlId,
requiredProjectId: item.requiredProjectId,
hidden: item.hidden || false
tags: decksLibraryContent[id].tags,
urlId: decksLibraryContent[id].urlId,
requiredProjectId: decksLibraryContent[id].requiredProjectId,
hidden: decksLibraryContent[id].hidden || false
}));
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