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 (#73)
  • Loading branch information
feugy authored Jun 12, 2024
1 parent fe76ed0 commit 5e6ff8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vercel/speed-insights",
"version": "1.0.11",
"version": "1.0.12",
"description": "Speed Insights is a tool for measuring web performance and providing suggestions for improvement.",
"keywords": [
"speed-insights",
Expand Down
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 5e6ff8c

Please sign in to comment.