修复删除js时自动卸载不完全
This commit is contained in:
parent
de3e7f377c
commit
ca96589af2
|
@ -750,9 +750,12 @@ class PluginsLoader {
|
||||||
logger.mark(`[卸载插件][${dirName}][${appName}]`)
|
logger.mark(`[卸载插件][${dirName}][${appName}]`)
|
||||||
/** 停止更新监听 */
|
/** 停止更新监听 */
|
||||||
this.watcher[`${dirName}.${appName}`].removeAllListeners('change')
|
this.watcher[`${dirName}.${appName}`].removeAllListeners('change')
|
||||||
for (const i in this.priority)
|
// lodash.remove(this.priority, { key })
|
||||||
if (this.priority[i].key == key)
|
for (let i = this.priority.length - 1; i >= 0; i--) {
|
||||||
|
if (this.priority[i].key === key) {
|
||||||
this.priority.splice(i, 1)
|
this.priority.splice(i, 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.watcher[`${dirName}.${appName}`] = watcher
|
this.watcher[`${dirName}.${appName}`] = watcher
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue