Merge pull request #942 from ethereum/yann300-patch-23

Check if `navigator` available
pull/7/head
yann300 6 years ago committed by GitHub
commit 63b7bab428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      remix-solidity/src/compiler/compiler.js

@ -73,7 +73,7 @@ function Compiler (handleImportCall) {
function onInternalCompilerLoaded () {
if (worker === null) {
var compiler
var userAgent = navigator.userAgent.toLowerCase()
var userAgent = (typeof (navigator) != 'undefined') && navigator.userAgent ? navigator.userAgent.toLowerCase() : "-"
if (typeof (window) === 'undefined' || userAgent.indexOf(' electron/') > -1) {
compiler = require('solc')
} else {

Loading…
Cancel
Save