Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit f3f22e9

Browse files
committed
correct error in checking on value of window
1 parent 97a2ed3 commit f3f22e9

File tree

1 file changed

+2
-1
lines changed
  • packages/compile-solidity/src

1 file changed

+2
-1
lines changed

packages/compile-solidity/src/run.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-env node, browser */
12
import { zeroLinkReferences, formatLinkReferences } from "./shims";
23
import debugModule from "debug";
34
const debug = debugModule("compile:run");
@@ -250,7 +251,7 @@ async function invokeCompiler({ compilerInput, options, solc }): Promise<{
250251

251252
// in the browser, compile in a worker and return the result
252253
// @ts-ignore
253-
if (window !== undefined) {
254+
if (typeof window !== "undefined") {
254255
const supplier = new CompilerSupplier(supplierOptions);
255256
const { soljson } = await supplier.loadSoljson();
256257
debug(

0 commit comments

Comments
 (0)