diff --git a/src/extensions/ipc/ipc-main.ts b/src/extensions/ipc/ipc-main.ts index e6e6d6d091..09d26b00fb 100644 --- a/src/extensions/ipc/ipc-main.ts +++ b/src/extensions/ipc/ipc-main.ts @@ -30,6 +30,8 @@ import logger from "../../main/logger"; export abstract class IpcMain extends IpcRegistrar { constructor(extension: LensMainExtension) { super(extension); + + // Call the static method on the bottom child class. extension[Disposers].push(() => (this.constructor as typeof IpcMain).resetInstance()); } diff --git a/src/extensions/ipc/ipc-renderer.ts b/src/extensions/ipc/ipc-renderer.ts index d5d2f9e098..364ebc5d73 100644 --- a/src/extensions/ipc/ipc-renderer.ts +++ b/src/extensions/ipc/ipc-renderer.ts @@ -28,6 +28,8 @@ import { once } from "lodash"; export abstract class IpcRenderer extends IpcRegistrar { constructor(extension: LensRendererExtension) { super(extension); + + // Call the static method on the bottom child class. extension[Disposers].push(() => (this.constructor as typeof IpcRenderer).resetInstance()); }