Unverified Commit 68c487c3 authored by yann300's avatar yann300 Committed by GitHub

Fix #950

parent 4d8c289c
...@@ -116,7 +116,9 @@ export function compileContractSources(sources: SrcIfc, importFileCb: any, opts: ...@@ -116,7 +116,9 @@ export function compileContractSources(sources: SrcIfc, importFileCb: any, opts:
compiler.compile(sources, filepath) compiler.compile(sources, filepath)
} }
], function (err: Error | null | undefined , result: any) { ], function (err: Error | null | undefined , result: any) {
let errors = (result.errors || []).filter((e) => e.type === 'Error' || e.severity === 'error') let error = []
if (result.error) error.push(result.error)
let errors = (result.errors || error).filter((e) => e.type === 'Error' || e.severity === 'error')
if (errors.length > 0) { if (errors.length > 0) {
if (!isBrowser) require('signale').fatal(errors) if (!isBrowser) require('signale').fatal(errors)
return cb(new Error('errors compiling')) return cb(new Error('errors compiling'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment