1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add explainitory comment

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-07-23 14:30:15 -04:00
parent 3c266eccf6
commit 867a4b890a
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,8 @@ import logger from "../../main/logger";
export abstract class IpcMain extends IpcRegistrar { export abstract class IpcMain extends IpcRegistrar {
constructor(extension: LensMainExtension) { constructor(extension: LensMainExtension) {
super(extension); super(extension);
// Call the static method on the bottom child class.
extension[Disposers].push(() => (this.constructor as typeof IpcMain).resetInstance()); extension[Disposers].push(() => (this.constructor as typeof IpcMain).resetInstance());
} }

View File

@ -28,6 +28,8 @@ import { once } from "lodash";
export abstract class IpcRenderer extends IpcRegistrar { export abstract class IpcRenderer extends IpcRegistrar {
constructor(extension: LensRendererExtension) { constructor(extension: LensRendererExtension) {
super(extension); super(extension);
// Call the static method on the bottom child class.
extension[Disposers].push(() => (this.constructor as typeof IpcRenderer).resetInstance()); extension[Disposers].push(() => (this.constructor as typeof IpcRenderer).resetInstance());
} }