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

Commit

Permalink
correct error in checking on value of window
Browse files Browse the repository at this point in the history
  • Loading branch information
eggplantzzz committed Jan 10, 2023
1 parent 97a2ed3 commit f3f22e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/compile-solidity/src/run.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-env node, browser */
import { zeroLinkReferences, formatLinkReferences } from "./shims";
import debugModule from "debug";
const debug = debugModule("compile:run");
Expand Down Expand Up @@ -250,7 +251,7 @@ async function invokeCompiler({ compilerInput, options, solc }): Promise<{

// in the browser, compile in a worker and return the result
// @ts-ignore
if (window !== undefined) {
if (typeof window !== "undefined") {
const supplier = new CompilerSupplier(supplierOptions);
const { soljson } = await supplier.loadSoljson();
debug(
Expand Down

0 comments on commit f3f22e9

Please sign in to comment.