From f103e5567b7913df0e1bca0c12d728e577f18169 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 6 Jan 2022 18:12:17 +0530 Subject: [PATCH] local compiler should be loaded without worker --- .../solidity-compiler/src/lib/compiler-container.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx index eabccbd8a8..8f53164da5 100644 --- a/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx +++ b/libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx @@ -356,12 +356,13 @@ export const CompilerContainer = (props: CompilerContainerProps) => { return console.log('loading ' + selectedVersion + ' not allowed, version should start with "soljson"') } } - // Workers cannot load js on "file:"-URLs and we get a // "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium, // resort to non-worker version in that case. - if (selectedVersion === 'builtin') selectedVersion = state.defaultVersion - if (selectedVersion !== 'builtin' && canUseWorker(selectedVersion)) { + if (selectedVersion === 'builtin') { + selectedVersion = state.defaultVersion + compileTabLogic.compiler.loadVersion(false, url) + } else if (canUseWorker(selectedVersion)) { compileTabLogic.compiler.loadVersion(true, url) } else { compileTabLogic.compiler.loadVersion(false, url)