mirror of
https://github.com/docmost/docmost.git
synced 2026-09-01 03:15:32 +08:00
add search guard
This commit is contained in:
@@ -30,8 +30,11 @@ function appendSearchParams(
|
|||||||
search?: string[],
|
search?: string[],
|
||||||
wholeWord?: boolean,
|
wholeWord?: boolean,
|
||||||
): string {
|
): string {
|
||||||
const params = new URLSearchParams();
|
if(search.length === 0){
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
const params = new URLSearchParams();
|
||||||
search
|
search
|
||||||
?.map((term) => term.trim())
|
?.map((term) => term.trim())
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
|
|||||||
Reference in New Issue
Block a user