10up / headstartwp

Build a headless website fast with WordPress, the world’s most popular CMS, and Next.js, the most popular React framework. A free and open source solution by the experts at 10up.
https://headstartwp.10up.com
153 stars 17 forks source link

Menu item ID is not necessarily a number #772

Open Knskan3 opened 2 months ago

Knskan3 commented 2 months ago

https://github.com/10up/headstartwp/blob/77764a99717598373177dd6c98df0c9d050a17d9/packages/core/src/react/hooks/useFetchMenu.ts#L21

When using polylang, the menu item ID could contain the id-LANG, causing errors during the Number cast.

In example:

Screenshot 2024-05-20 at 16 14 57
nicholasio commented 1 month ago

Thanks for the bug report