Skip to content

Commit

Permalink
add isInitialized
Browse files Browse the repository at this point in the history
  • Loading branch information
fydne committed Feb 25, 2023
1 parent a6c1cc2 commit d66d770
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { initialize, enable } from "./server";
export { initialize, isInitialized, enable } from "./server";
7 changes: 6 additions & 1 deletion src/main/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,12 @@ const logStack = function (contents: WebContents, code: string, stack: string |
}
}

let initialized = false
let initialized = false;

export function isInitialized() {
return initialized;
}

export function initialize() {
if (initialized)
throw new Error('@electron/remote has already been initialized')
Expand Down

0 comments on commit d66d770

Please sign in to comment.