Fix: empty query issue. (#5830)

### What problem does this PR solve?

#5214

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2025-03-10 13:56:56 +08:00 committed by GitHub
parent fa817a8ab3
commit 15736c57c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,7 +66,7 @@ class FulltextQueryer:
otxt = txt
for r, p in patts:
txt = re.sub(r, p, txt, flags=re.IGNORECASE)
if not otxt:
if not txt:
txt = otxt
return txt