can use worker

rdesktop2
filip mertens 1 year ago
parent 5ee444e030
commit 6045655cd2
  1. 3
      libs/remix-solidity/src/compiler/compiler-utils.ts

@ -1,5 +1,4 @@
import * as semver from 'semver' import * as semver from 'semver'
const isElectron = require('is-electron')
/* global Worker */ /* global Worker */
export const baseURLBin = 'https://binaries.soliditylang.org/bin' export const baseURLBin = 'https://binaries.soliditylang.org/bin'
@ -35,7 +34,6 @@ export function urlFromVersion (version) {
* checks a compiler whitelist, browser support and OS. * checks a compiler whitelist, browser support and OS.
*/ */
export function canUseWorker (selectedVersion) { export function canUseWorker (selectedVersion) {
console.log('canUseWorker', selectedVersion)
if (selectedVersion.startsWith('http')) { if (selectedVersion.startsWith('http')) {
return browserSupportWorker() return browserSupportWorker()
} }
@ -53,7 +51,6 @@ export function canUseWorker (selectedVersion) {
} }
function browserSupportWorker () { function browserSupportWorker () {
if(isElectron()) return true
return document ? document.location.protocol !== 'file:' && Worker !== undefined : false return document ? document.location.protocol !== 'file:' && Worker !== undefined : false
} }

Loading…
Cancel
Save