Merge pull request #1238 from ethereum/yann300-patch-22

Fix #950
pull/5370/head
yann300 5 years ago committed by GitHub
commit 325e6621fd
  1. 4
      remix-tests/src/compiler.ts

@ -116,7 +116,9 @@ export function compileContractSources(sources: SrcIfc, importFileCb: any, opts:
compiler.compile(sources, filepath)
}
], function (err: Error | null | undefined , result: any) {
let errors = (result.errors || []).filter((e) => e.type === 'Error' || e.severity === 'error')
let error: 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 (!isBrowser) require('signale').fatal(errors)
return cb(new Error('errors compiling'))

Loading…
Cancel
Save