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