|
|
|
@ -309,7 +309,14 @@ export const CompilerContainer = (props: CompilerContainerProps) => { |
|
|
|
|
|
|
|
|
|
allVersions = [...allVersions, ...versions] |
|
|
|
|
selectedVersion = state.defaultVersion |
|
|
|
|
if (api.getCompilerParameters().version) selectedVersion = api.getCompilerParameters().version |
|
|
|
|
if (api.getCompilerParameters().version) { |
|
|
|
|
const versionFromURL = api.getCompilerParameters().version |
|
|
|
|
// URL version can be like 0.8.7+commit.e28d00a7, 0.8.7 or soljson-v0.8.7+commit.e28d00a7.js
|
|
|
|
|
const selectedVersionArr = versions.filter(obj => obj.path === versionFromURL || obj.longVersion === versionFromURL || obj.version === versionFromURL) |
|
|
|
|
// for version like 0.8.15, there will be more than one elements in the array
|
|
|
|
|
// In that case too, index 0 will have non-nightly version object
|
|
|
|
|
if (selectedVersionArr.length) selectedVersion = selectedVersionArr[0].path |
|
|
|
|
} |
|
|
|
|
// Check if version is a URL and corresponding filename starts with 'soljson'
|
|
|
|
|
if (selectedVersion.startsWith('https://')) { |
|
|
|
|
const urlArr = selectedVersion.split('/') |
|
|
|
|