Link renders error with deleted page

I noticed that when you delete a page that is linked, the rendered page crashes when using nextjs.

plasmic is passing undefined as href to a next/link <Link /> component which is invalid and throws a runtime error

Hi Marco, thank’s for reporting it, we will be looking into fixing it

the error that is thrown is “Error: Failed prop type: The prop href expects a string or object in <Link>, but got undefined instead.”

its very hard to recover from this, you basically have to go through all links in plasmic to find the missing one

aaah, wait a second

i set

import Link from "next/link";
//
      <PlasmicRootProvider
        disableLoadingBoundary
        loader={PLASMIC}
        Link={Link}

i don’t remember why i did this, but i think it was because otherwise the language is not passed, but i am not totally sure

however without setting Link={Link} there is no runtime error when a page got deleted

the reason was that without setting the Link, there is an hydration error