update error filtering so it checks for severity instead of just type

pull/7/head
Iuri Matias 7 years ago
parent 02c51234a3
commit d78bcebc3b
  1. 2
      src/compiler.js

@ -36,7 +36,7 @@ function compileFileOrFiles (filename, isDirectory, cb) {
compiler.compile(sources, filepath) compiler.compile(sources, filepath)
} }
], function (err, result) { ], function (err, result) {
let errors = (result.errors || []).filter((e) => e.type === 'Error') let errors = (result.errors || []).filter((e) => e.type === 'Error' || e.severity === 'error')
if (errors.length > 0) { if (errors.length > 0) {
console.dir(errors) console.dir(errors)
return cb(new Error('errors compiling')) return cb(new Error('errors compiling'))

Loading…
Cancel
Save