Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1238 from ethereum/yann300-patch-22
Browse files Browse the repository at this point in the history
Fix #950
  • Loading branch information
yann300 authored Jun 26, 2019
2 parents 4d8c289 + 8ee2b84 commit ac89375
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion remix-tests/src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit ac89375

Please sign in to comment.