From ba0696a0d72cd1337ea5484f6af5563db4d2c652 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 2 Apr 2018 10:59:22 +0300 Subject: Incroduce the Warning constant --- packages/deployer/src/compiler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/deployer/src/compiler.ts b/packages/deployer/src/compiler.ts index b63f6033f..4bd636c90 100644 --- a/packages/deployer/src/compiler.ts +++ b/packages/deployer/src/compiler.ts @@ -179,7 +179,8 @@ export class Compiler { ); if (!_.isUndefined(compiled.errors)) { - const isError = (errorOrWarning: string) => !errorOrWarning.includes('Warning'); + const SOLIDITY_WARNING_PREFIX = 'Warning'; + const isError = (errorOrWarning: string) => !errorOrWarning.includes(SOLIDITY_WARNING_PREFIX); const errors = _.filter(compiled.errors, isError); _.forEach(compiled.errors, errMsg => { const normalizedErrMsg = getNormalizedErrMsg(errMsg); -- cgit v1.2.3