Skip to content

Commit

Permalink
fix(#56,#72): useSearchParams might return null and break script inse…
Browse files Browse the repository at this point in the history
…rtion
  • Loading branch information
feugy committed Jun 12, 2024
1 parent fe76ed0 commit faf5a55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web/src/nextjs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { computeRoute } from '../utils';

export const useRoute = (): string | null => {
const params = useParams();
const searchParams = useSearchParams();
const searchParams = useSearchParams() || new URLSearchParams();
const path = usePathname();

const finalParams = {
Expand Down

0 comments on commit faf5a55

Please sign in to comment.