next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

fix(next-drupal): undefined is not serializable

Open yobottehg opened this issue 9 months ago • 1 comments

This pull request is for: (mark with an "x")

  • [ ] examples/*
  • [ ] modules/next
  • [x] packages/next-drupal
  • [ ] starters/basic-starter
  • [ ] starters/graphql-starter
  • [ ] starters/pages-starter
  • [ ] Other

GitHub Issue: #793

  • [ ] I need help adding tests. (mark with an "x") Code changes need test coverage. If you don't know how to make tests, check this box to ask for help.

Describe your changes

When serializing the menu props in getStaticProps in Next.js 15 pages router it fails because undefined is not serializable. This changes undefined to null so it can be serialized.

The same issue should happen with app router and the export target

yobottehg avatar Jan 20 '25 08:01 yobottehg