From 2b223b27048b2ff628d10165c1fbf09c224d155b Mon Sep 17 00:00:00 2001 From: kwaroran Date: Wed, 7 Feb 2024 02:55:12 +0900 Subject: [PATCH] Fix moduleIds concatenation in getModuleLorebooks, getModuleTriggers, and getModuleRegexScripts functions --- src/ts/process/modules.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ts/process/modules.ts b/src/ts/process/modules.ts index 23c2d028..0b8943be 100644 --- a/src/ts/process/modules.ts +++ b/src/ts/process/modules.ts @@ -65,8 +65,8 @@ export function getModuleLorebooks() { const currentChat = get(CurrentChat) const db = get(DataBase) if (!currentChat) return [] - const moduleIds = currentChat.modules ?? [] - moduleIds.concat(db.enabledModules) + let moduleIds = currentChat.modules ?? [] + moduleIds = moduleIds.concat(db.enabledModules) let lorebooks: loreBook[] = [] for (const moduleId of moduleIds) { const module = getModuleById(moduleId) @@ -85,8 +85,8 @@ export function getModuleTriggers() { const currentChat = get(CurrentChat) const db = get(DataBase) if (!currentChat) return [] - const moduleIds = currentChat.modules ?? [] - moduleIds.concat(db.enabledModules) + let moduleIds = currentChat.modules ?? [] + moduleIds = moduleIds.concat(db.enabledModules) let triggers: triggerscript[] = [] for (const moduleId of moduleIds) { const module = getModuleById(moduleId) @@ -104,8 +104,8 @@ export function getModuleRegexScripts() { const currentChat = get(CurrentChat) const db = get(DataBase) if (!currentChat) return [] - const moduleIds = currentChat.modules ?? [] - moduleIds.concat(db.enabledModules) + let moduleIds = currentChat.modules ?? [] + moduleIds = moduleIds.concat(db.enabledModules) let customscripts: customscript[] = [] for (const moduleId of moduleIds) { const module = getModuleById(moduleId)