Skip to content

Commit 27838e7

Browse files
committed
fix: quote text search
1 parent 4256a73 commit 27838e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/quotes/quote-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class QuoteManager {
280280
async getRandomQuoteContainingText(text: string): Promise<Quote> {
281281
try {
282282
const textPattern = new RegExp(`\\b${this.regExpEscape(text)}\\b`, 'i');
283-
const quotes = await this.db.findAsync({ originator: { $regex: textPattern } });
283+
const quotes = await this.db.findAsync({ text: { $regex: textPattern } });
284284

285285
if (!quotes.length) {
286286
return;

0 commit comments

Comments
 (0)