In Next 13, using useRouter throws NextRouter was not mounted

Next 13 using useRouter throws:

const router = useRouter()

Plasmic: Encountered error while prepass rendering: Error: Error: NextRouter was not mounted.

This is probably thrown during pre-rendering (extractPlasmicQueryData), which tries to render a next page outside of the next context. I don’t think it used to throw though… you may need to wrap your usage of useRouter :pensive:

function useMyRouter() {
  try {
    return useRouter();
  } catch {
    return {};

It didn’t throw in the past. Yeesh any chance we can get this on plasmic side?