From e60445d75c75864ea2d66182222075456ad16c9a Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Sat, 22 May 2021 10:11:42 -0700 Subject: [PATCH] fix(plugin-local-electron): bind methods correctly (#2280) --- packages/plugin/local-electron/src/LocalElectronPlugin.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/plugin/local-electron/src/LocalElectronPlugin.ts b/packages/plugin/local-electron/src/LocalElectronPlugin.ts index 9cb12a68d5..c11cc8dd32 100644 --- a/packages/plugin/local-electron/src/LocalElectronPlugin.ts +++ b/packages/plugin/local-electron/src/LocalElectronPlugin.ts @@ -6,6 +6,13 @@ import { LocalElectronPluginConfig } from './Config'; export default class LocalElectronPlugin extends PluginBase { name = 'local-electron'; + constructor(c: LocalElectronPluginConfig) { + super(c); + + this.getHook = this.getHook.bind(this); + this.startLogic = this.startLogic.bind(this); + } + get enabled() { if (typeof this.config.enabled === 'undefined') { return true;