mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-23 07:38:07 -05:00
Catch errors in getExtensions function
This commit is contained in:
parent
bd47d763fa
commit
456e99f1be
1 changed files with 4 additions and 0 deletions
|
@ -118,6 +118,10 @@ class Preview extends React.Component {
|
|||
input = JSON.stringify(input);
|
||||
}
|
||||
parser(projectAsset.data, false, (err, projectData) => {
|
||||
if (err) {
|
||||
console.log('Caught project parsing error:', err); // eslint-disable-line no-console
|
||||
return;
|
||||
}
|
||||
const extensionSet = new Set();
|
||||
projectData[0].targets.forEach(target => target.extensions.forEach(extension => {
|
||||
extensionSet.add(EXTENSION_INFO[extension]);
|
||||
|
|
Loading…
Reference in a new issue