diff --git a/libs/remix-solidity/src/compiler/compiler.ts b/libs/remix-solidity/src/compiler/compiler.ts index daff161536..8921bde0fd 100644 --- a/libs/remix-solidity/src/compiler/compiler.ts +++ b/libs/remix-solidity/src/compiler/compiler.ts @@ -130,6 +130,7 @@ export class Compiler { onCompilationFinished (data: CompilationResult, missingInputs?: string[], source?: SourceWithTarget): void { let noFatalErrors = true // ie warnings are ok + const checkIfFatalError = (error: CompilationError) => { // Ignore warnings and the 'Deferred import' error as those are generated by us as a workaround const isValidError = (error.message && error.message.includes('Deferred import')) ? false : error.severity !== 'warning' diff --git a/libs/remix-tests/src/compiler.ts b/libs/remix-tests/src/compiler.ts index 08b8393a6e..c14ba4080b 100644 --- a/libs/remix-tests/src/compiler.ts +++ b/libs/remix-tests/src/compiler.ts @@ -129,7 +129,7 @@ export function compileFileOrFiles(filename: string, isDirectory: boolean, opts: ], function (err: Error | null | undefined, result: any) { const error: Error[] = [] if (result.error) error.push(result.error) - const errors = (result.errors || error).filter((e) => (e.type === 'Error' || e.severity === 'error')) + const 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 CompilationErrors(errors))