From c323d706c7d01cdf58c646485276d735938b2d5a Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 26 Jun 2019 11:29:13 +0200 Subject: [PATCH 1/2] Fix #950 --- remix-tests/src/compiler.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/remix-tests/src/compiler.ts b/remix-tests/src/compiler.ts index ceb1260515..b3ae92078f 100644 --- a/remix-tests/src/compiler.ts +++ b/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 = [] + 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')) From 6f5ba62ea01b762926ead7ca3e85153c4f33c155 Mon Sep 17 00:00:00 2001 From: 0mkar <0mkar@protonmail.com> Date: Wed, 26 Jun 2019 16:25:38 +0530 Subject: [PATCH 2/2] fix build --- remix-tests/src/compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remix-tests/src/compiler.ts b/remix-tests/src/compiler.ts index b3ae92078f..9b56eadc75 100644 --- a/remix-tests/src/compiler.ts +++ b/remix-tests/src/compiler.ts @@ -116,7 +116,7 @@ export function compileContractSources(sources: SrcIfc, importFileCb: any, opts: compiler.compile(sources, filepath) } ], function (err: Error | null | undefined , result: any) { - let 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) {