Skip to content

Commit

Permalink
Fix moduleIds concatenation in getModuleLorebooks, getModuleTriggers,…
Browse files Browse the repository at this point in the history
… and getModuleRegexScripts functions
  • Loading branch information
kwaroran committed Feb 6, 2024
1 parent ad443b3 commit 2b223b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ts/process/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 2b223b2

Please sign in to comment.