Fix storage.?[emittersymbol] is undefined issue when uninstalling plugin
This commit is contained in:
parent
67bf70090a
commit
eee9d823ca
1 changed files with 3 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { VdPluginManager, VendettaPlugin } from "@core/vendetta/plugins";
|
||||
import { useProxy } from "@core/vendetta/storage";
|
||||
import { useProxy, createProxy } from "@core/vendetta/storage";
|
||||
|
||||
import { UnifiedPluginModel } from ".";
|
||||
|
||||
|
|
@ -20,7 +20,8 @@ export default function unifyVdPlugin(
|
|||
isInstalled: () =>
|
||||
Boolean(vdPlugin && VdPluginManager.plugins[vdPlugin.id]),
|
||||
usePluginState() {
|
||||
useProxy(VdPluginManager.plugins[vdPlugin.id]);
|
||||
const dummyProxy = createProxy({}).proxy;
|
||||
useProxy(VdPluginManager.plugins[vdPlugin.id] ?? dummyProxy);
|
||||
},
|
||||
toggle(start: boolean) {
|
||||
start
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue