WordPress / create-block-theme

A WordPress plugin to create block themes
https://wordpress.org/plugins/create-block-theme/
GNU General Public License v2.0
310 stars 44 forks source link

Fix the jslint warning from useSelect usage #651

Closed pbking closed 1 month ago

pbking commented 1 month ago

Fix the jslint warning (or infinate loop error when fixed) from useSelect usage.

Pulled the subfolder value (once) and set it in the initial call to useState rather than using that state in the useSelect when fetching the current theme's subfolder.

Fixes jslint warning and everything works as expected.

(To test, create a new theme using the Editor interface. It should be created in the same subfolder as the currently activated theme)