chore(lib/plugins): set arrays lengths to zero to reset states

This commit is contained in:
PalmDevs 2025-08-11 16:48:26 +07:00
parent 28f8c02869
commit fca5dd1559
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -515,8 +515,8 @@ export async function stopPlugin(plugin: AnyPlugin) {
// Reset state
plugin.api = undefined
meta.apiLevel = PluginApiLevel.None
meta.promises = []
meta.cleanups = []
meta.promises.length = 0
meta.cleanups.length = 0
plugin.status = 0
pEmitter.emit('stopped', plugin)