From ad9a7d72ced3898d7ba2922433bc666980f81b4e Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Wed, 15 Aug 2018 11:58:10 -0700 Subject: remedy missing *IfExists identifier suffix --- packages/sol-compiler/src/compiler.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index 286f15073..1c08cb324 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -184,12 +184,9 @@ export class Compiler { if (!shouldCompile) { continue; } - let solcVersion = this._solcVersionIfExists; - if (_.isUndefined(solcVersion)) { - const solcVersionRange = parseSolidityVersionRange(contractSource.source); - const availableCompilerVersions = _.keys(binPaths); - solcVersion = semver.maxSatisfying(availableCompilerVersions, solcVersionRange); - } + const solcVersion = _.isUndefined(this._solcVersionIfExists) + ? semver.maxSatisfying(_.keys(binPaths), parseSolidityVersionRange(contractSource.source)) + : this._solcVersionIfExists; if (_.isUndefined(versionToInputs[solcVersion])) { versionToInputs[solcVersion] = { standardInput: { -- cgit v1.2.3