Skip to content

Commit

Permalink
fix: fixed missing boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
wyattjoh committed Oct 28, 2022
1 parent a84d916 commit 04c93d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/next/client/route-announcer.tsx
Expand Up @@ -17,7 +17,7 @@ const nextjsRouteAnnouncerStyles: React.CSSProperties = {
}

export const RouteAnnouncer = () => {
const { asPath } = useRouter()
const { asPath } = useRouter(true)
const [routeAnnouncement, setRouteAnnouncement] = React.useState('')

// Only announce the path change, but not for the first load because screen
Expand Down
4 changes: 2 additions & 2 deletions packages/next/shared/lib/router/router.ts
Expand Up @@ -122,11 +122,11 @@ function stripOrigin(url: string) {
return url.startsWith(origin) ? url.substring(origin.length) : url
}

function omit<T extends { [key: string]: any }, K extends keyof T>(
function omit<T extends { [key: string]: unknown }, K extends keyof T>(
object: T,
keys: K[]
): Omit<T, K> {
const omitted: { [key: string]: any } = {}
const omitted: { [key: string]: unknown } = {}
Object.keys(object).forEach((key) => {
if (!keys.includes(key as K)) {
omitted[key] = object[key]
Expand Down

0 comments on commit 04c93d5

Please sign in to comment.