diff --git a/src/app/tabs/compileTab/compilerContainer.js b/src/app/tabs/compileTab/compilerContainer.js index 1fe6c47ee9..f96bfedbd2 100644 --- a/src/app/tabs/compileTab/compilerContainer.js +++ b/src/app/tabs/compileTab/compilerContainer.js @@ -124,7 +124,7 @@ class CompilerContainer { const pragmaStr = pragmaArr[0].replace('pragma solidity', '').trim() const pragma = pragmaStr.substring(0, pragmaStr.length - 1) const fixedVersions = this.data.allversions.filter(obj => !obj.prerelease).map(obj => obj.version) - if (!semver.satisfies(this._retrieveVersion(), pragma)) { + if (fixedVersions.includes(this.data.selectedVersion) && !semver.satisfies(this._retrieveVersion(), pragma)) { const compilerToLoad = semver.maxSatisfying(fixedVersions, pragma) const compilerPath = this.data.allversions.filter(obj => !obj.prerelease && obj.version === compilerToLoad)[0].path if (this.data.selectedVersion !== compilerPath) { @@ -208,9 +208,11 @@ class CompilerContainer {