Skip to content

Commit

Permalink
Fix TS error
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Jan 10, 2024
1 parent 7ee5dcb commit 66c6373
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/routes/_layout.tutorials/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ export function loader({ request, context }: LoaderFunctionArgs) {

let url = new URL(request.url);

let query = z
.string()
.transform((v) => v.toLowerCase())
.nullable()
.parse(url.searchParams.get("q"));
let query =
z
.string()
.transform((v) => v.toLowerCase().trim())
.nullable()
.parse(url.searchParams.get("q")) ?? "";

let tutorials = await queryTutorials(context, query);

Expand Down

0 comments on commit 66c6373

Please sign in to comment.