Next.js error: cannot read properties of undefined (reading 'lenght')

I get this error: cannot read properties of undefined (reading 'lenght'): https://pastebin.com/JDxdK0u5

With this code:
const InternalHome = observer(() => {
 // ...
  const { locale, query, replace } = useRouter();

  const cityById =
    typeof query.cityId === "string"
      ? useQuery(convexApi.getCity.findCityById, {
          id: parseInt(query.cityId),
        })
      : undefined;
image.png
image.png
image.png
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was this page helpful?