mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Add additional check to getExtensions function
This commit is contained in:
parent
ccfd25d864
commit
5dfbe422d7
1 changed files with 2 additions and 0 deletions
|
@ -123,9 +123,11 @@ class Preview extends React.Component {
|
|||
return;
|
||||
}
|
||||
const extensionSet = new Set();
|
||||
if (projectData[0].targets) {
|
||||
projectData[0].targets.forEach(target => target.extensions.forEach(extension => {
|
||||
extensionSet.add(EXTENSION_INFO[extension]);
|
||||
}));
|
||||
}
|
||||
this.setState({
|
||||
extensions: Array.from(extensionSet)
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue