fix loading remote compiler

pull/3614/head
yann300 2 years ago
parent 804f828627
commit 7429bdbe0d
  1. 4
      libs/remix-solidity/src/compiler/compiler-utils.ts

@ -16,10 +16,10 @@ export function urlFromVersion (version) {
let location: string | Location = window.document.location
let path = location.pathname
if (!path.startsWith('/')) path = '/' + path
location = `${location.protocol}//${location.host}${path}assets/js`
location = `${location.protocol}//${location.host}${path}`
if (location.endsWith('index.html')) location = location.substring(0, location.length - 10)
if (!location.endsWith('/')) location += '/'
url = `${location}soljson.js`
url = `${location}assets/js/soljson.js`
} else {
version = version.replace('.Emscripten.clang', '')
if (!version.startsWith('soljson-v')) version = 'soljson-v' + version

Loading…
Cancel
Save