fix nomodule error

This commit is contained in:
kwaroran
2024-07-10 18:02:52 +09:00
parent d987ea3932
commit 6309317945
4 changed files with 20 additions and 9 deletions

View File

@@ -198,6 +198,13 @@ async function preInit(){
}
function onModuleUpdate(){
if(!Array.isArray(lastGlobalEnabledModules)){
lastGlobalEnabledModules = []
}
if(!Array.isArray(lastChatEnabledModules)){
lastChatEnabledModules = []
}
const m = getModules([
...lastGlobalEnabledModules, ...lastChatEnabledModules
])
@@ -205,6 +212,10 @@ function onModuleUpdate(){
let moduleHideIcon = false
let backgroundEmbedding = ''
m.forEach((module) => {
if(!module){
return
}
if(module.hideIcon){
moduleHideIcon = true
}