Fix the bug with gather imports

pull/1/head
Alex Beregszaszi 8 years ago
parent e54949b3a1
commit f00c8defd6
  1. 6
      src/app/compiler.js

@ -84,13 +84,15 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) {
var noFatalErrors = true; // ie warnings are ok var noFatalErrors = true; // ie warnings are ok
if (data['error'] !== undefined) { if (data['error'] !== undefined) {
if (utils.errortype(data['error']) !== 'warning') { // Ignore warnings (and the 'Deferred import' error as those are generated by us as a workaround
if (utils.errortype(data['error']) !== 'warning' && /Deferred import/.exec(data['error']) === null) {
noFatalErrors = false; noFatalErrors = false;
} }
} }
if (data['errors'] !== undefined) { if (data['errors'] !== undefined) {
data['errors'].forEach(function (err) { data['errors'].forEach(function (err) {
if (utils.errortype(err) !== 'warning') { // Ignore warnings and the 'Deferred import' error as those are generated by us as a workaround
if (utils.errortype(err) !== 'warning' && /Deferred import/.exec(err) === null) {
noFatalErrors = false; noFatalErrors = false;
} }
}); });

Loading…
Cancel
Save