You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue has been isolated to attempting to destructure the return value of useSettings(). Prior to WP 7.0 this did not seem to be an issue, but now it reliably returns undefined on first render. Original description left intact below:
After installing WordPress 7.0, some custom functionality using useSettings (from @wordpress/block-editor) that was previously working started throwing an error. The exact error is not terribly enlightening:
TypeError: i.useSettings(...)[Symbol.iterator]().next().value is undefined
Description
The issue has been isolated to attempting to destructure the return value of
useSettings(). Prior to WP 7.0 this did not seem to be an issue, but now it reliably returns undefined on first render. Original description left intact below:After installing WordPress 7.0, some custom functionality using
useSettings(from@wordpress/block-editor) that was previously working started throwing an error. The exact error is not terribly enlightening:This is the line that is failing in a demo theme repo: https://github.com/cr0ybot/theme-typography-presets-demo/blob/701933d77ef9dd73b5185bdfe77d940f6cf470ca/src/editor.js#L130
I was able to work around the issue by replacing this:
...with this:
Note that I have also tried
useSettings( 'custom' )without the path in an array, it makes no difference.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
https://github.com/cr0ybot/theme-typography-presets-demo
Screen.Recording.2026-06-02.at.2.32.37.PM.mov
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.