|
@@ -1,7 +1,7 @@
|
|
|
import type { QueryTerms } from '~/server/interfaces/search';
|
|
import type { QueryTerms } from '~/server/interfaces/search';
|
|
|
|
|
|
|
|
export function excludeUserPagesFromQuery(terms: QueryTerms): void {
|
|
export function excludeUserPagesFromQuery(terms: QueryTerms): void {
|
|
|
- const userRegex: RegExp = /^\/user($|\/)/;
|
|
|
|
|
|
|
+ const userRegex: RegExp = /^\/user($|\/(?!\/))/;
|
|
|
|
|
|
|
|
terms.prefix = terms.prefix.filter((p) => !userRegex.test(p));
|
|
terms.prefix = terms.prefix.filter((p) => !userRegex.test(p));
|
|
|
terms.not_prefix = terms.not_prefix.filter((p) => !userRegex.test(p));
|
|
terms.not_prefix = terms.not_prefix.filter((p) => !userRegex.test(p));
|