Pre Merge pull request !152 from UCPr/master

This commit is contained in:
UCPr 2024-03-22 13:01:26 +00:00 committed by Gitee
commit 6c157c4442
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 2 deletions

View File

@ -750,9 +750,12 @@ class PluginsLoader {
logger.mark(`[卸载插件][${dirName}][${appName}]`)
/** 停止更新监听 */
this.watcher[`${dirName}.${appName}`].removeAllListeners('change')
for (const i in this.priority)
if (this.priority[i].key == key)
// lodash.remove(this.priority, { key })
for (let i = this.priority.length - 1; i >= 0; i--) {
if (this.priority[i].key === key) {
this.priority.splice(i, 1)
}
}
})
this.watcher[`${dirName}.${appName}`] = watcher
}