Skip to content

Commit

Permalink
fix: type of reg can't be string
Browse files Browse the repository at this point in the history
  • Loading branch information
lava081 committed Aug 30, 2024
1 parent 4ca7371 commit cd1f9da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ export class AdapterQQBot implements KarinAdapter {
const { regex } = Config.getBotConfig(this.account.uid) || { regex: [] }
for (const r of regex) {
const reg = r.reg
if (typeof reg !== 'string') continue
v = v.replace(reg, r.rep)
v = v.trim().replace(reg, r.rep)
}
elements.push(segment.text(v))
}
Expand Down

0 comments on commit cd1f9da

Please sign in to comment.