mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 19:01:47 +00:00
fix: fix unloader
This commit is contained in:
@ -126,10 +126,11 @@ export const stopPlugin = <Config extends PluginConfig>(
|
||||
if (!def || !def[options.ctx]) return false;
|
||||
if (typeof def[options.ctx] === 'function') return false;
|
||||
|
||||
const stop = def[options.ctx] as PluginLifecycleSimple<Config, unknown>;
|
||||
if (!stop) return null;
|
||||
const defCtx = def[options.ctx] as { stop: PluginLifecycleSimple<Config, unknown> } | undefined;
|
||||
if (!defCtx?.stop) return null;
|
||||
|
||||
try {
|
||||
const stop = defCtx.stop;
|
||||
const start = performance.now();
|
||||
stop.bind(def[options.ctx])(
|
||||
options.context as Config & typeof options.context,
|
||||
|
||||
Reference in New Issue
Block a user