From 808b120e089089a60e98b90ca7f0d1c352284ca7 Mon Sep 17 00:00:00 2001 From: Samuel Maddock Date: Wed, 4 Dec 2024 18:28:22 -0500 Subject: [PATCH] fix: install -> uninstall web store extension --- .../src/renderer/web-store-preload.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/electron-chrome-web-store/src/renderer/web-store-preload.ts b/packages/electron-chrome-web-store/src/renderer/web-store-preload.ts index c3a9c74..68a66bd 100644 --- a/packages/electron-chrome-web-store/src/renderer/web-store-preload.ts +++ b/packages/electron-chrome-web-store/src/renderer/web-store-preload.ts @@ -279,9 +279,12 @@ function setupChromeWebStoreApi() { contextBridge.exposeInMainWorld('electronManagement', management) webFrame.executeJavaScript(` - chrome.webstorePrivate = globalThis.electronWebstore; - chrome.runtime = globalThis.electronRuntime; - chrome.management = globalThis.electronManagement; + (function () { + chrome.webstorePrivate = globalThis.electronWebstore; + Object.assign(chrome.runtime, electronRuntime); + Object.assign(chrome.management, electronManagement); + void 0; + }()); `) // Fetch app name