Fix moduleIds concatenation in getModuleLorebooks, getModuleTriggers, and getModuleRegexScripts functions
This commit is contained in:
@@ -65,8 +65,8 @@ export function getModuleLorebooks() {
|
|||||||
const currentChat = get(CurrentChat)
|
const currentChat = get(CurrentChat)
|
||||||
const db = get(DataBase)
|
const db = get(DataBase)
|
||||||
if (!currentChat) return []
|
if (!currentChat) return []
|
||||||
const moduleIds = currentChat.modules ?? []
|
let moduleIds = currentChat.modules ?? []
|
||||||
moduleIds.concat(db.enabledModules)
|
moduleIds = moduleIds.concat(db.enabledModules)
|
||||||
let lorebooks: loreBook[] = []
|
let lorebooks: loreBook[] = []
|
||||||
for (const moduleId of moduleIds) {
|
for (const moduleId of moduleIds) {
|
||||||
const module = getModuleById(moduleId)
|
const module = getModuleById(moduleId)
|
||||||
@@ -85,8 +85,8 @@ export function getModuleTriggers() {
|
|||||||
const currentChat = get(CurrentChat)
|
const currentChat = get(CurrentChat)
|
||||||
const db = get(DataBase)
|
const db = get(DataBase)
|
||||||
if (!currentChat) return []
|
if (!currentChat) return []
|
||||||
const moduleIds = currentChat.modules ?? []
|
let moduleIds = currentChat.modules ?? []
|
||||||
moduleIds.concat(db.enabledModules)
|
moduleIds = moduleIds.concat(db.enabledModules)
|
||||||
let triggers: triggerscript[] = []
|
let triggers: triggerscript[] = []
|
||||||
for (const moduleId of moduleIds) {
|
for (const moduleId of moduleIds) {
|
||||||
const module = getModuleById(moduleId)
|
const module = getModuleById(moduleId)
|
||||||
@@ -104,8 +104,8 @@ export function getModuleRegexScripts() {
|
|||||||
const currentChat = get(CurrentChat)
|
const currentChat = get(CurrentChat)
|
||||||
const db = get(DataBase)
|
const db = get(DataBase)
|
||||||
if (!currentChat) return []
|
if (!currentChat) return []
|
||||||
const moduleIds = currentChat.modules ?? []
|
let moduleIds = currentChat.modules ?? []
|
||||||
moduleIds.concat(db.enabledModules)
|
moduleIds = moduleIds.concat(db.enabledModules)
|
||||||
let customscripts: customscript[] = []
|
let customscripts: customscript[] = []
|
||||||
for (const moduleId of moduleIds) {
|
for (const moduleId of moduleIds) {
|
||||||
const module = getModuleById(moduleId)
|
const module = getModuleById(moduleId)
|
||||||
|
|||||||
Reference in New Issue
Block a user