mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
Fix startsWith RegExp type bug in checkChatMsg function
Co-authored-by: ikechan8370 <21212372+ikechan8370@users.noreply.github.com>
This commit is contained in:
parent
06a415bca3
commit
607fafb1f6
1 changed files with 1 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ export function checkChatMsg (e, toggleMode, togglePrefix) {
|
|||
return true
|
||||
}
|
||||
const prefixReg = new RegExp(`^#?(图片)?${togglePrefix}[^gpt][sS]*`)
|
||||
if (toggleMode === 'prefix' && e.msg.startsWith(prefixReg)) {
|
||||
if (toggleMode === 'prefix' && prefixReg.test(e.msg)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue