Catch errors in getExtensions function

This commit is contained in:
Connor Hudson 2018-06-20 17:04:16 -04:00
parent bd47d763fa
commit 456e99f1be

View file

@ -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]);