From 456e99f1bea62288763607c883bcb2fa4fead642 Mon Sep 17 00:00:00 2001 From: Connor Hudson Date: Wed, 20 Jun 2018 17:04:16 -0400 Subject: [PATCH] Catch errors in getExtensions function --- src/views/preview/preview.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/views/preview/preview.jsx b/src/views/preview/preview.jsx index c272f201b..3d481f873 100644 --- a/src/views/preview/preview.jsx +++ b/src/views/preview/preview.jsx @@ -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]);