diff --git a/src/main/index.ts b/src/main/index.ts index d06177a..c4bc390 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1 +1 @@ -export { initialize, enable } from "./server"; +export { initialize, isInitialized, enable } from "./server"; diff --git a/src/main/server.ts b/src/main/server.ts index 0c988ed..811be07 100644 --- a/src/main/server.ts +++ b/src/main/server.ts @@ -358,6 +358,11 @@ const logStack = function (contents: WebContents, code: string, stack: string | } let initialized = false + +export function isInitialized() { + return initialized +} + export function initialize() { if (initialized) throw new Error('@electron/remote has already been initialized')