Skip to content

Commit

Permalink
Fix: Styles section does not moves stylebook to typography.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Nov 29, 2024
1 parent 52b5429 commit 255224f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/edit-site/src/components/style-book/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ const scrollToSection = ( anchorId, iframe ) => {
*/
const getStyleBookNavigationFromPath = ( path ) => {
if ( path && typeof path === 'string' ) {
if ( path.startsWith( '/typography' ) ) {
return {
block: 'typography',
};
}
let block = path.includes( '/blocks/' )
? decodeURIComponent( path.split( '/blocks/' )[ 1 ] )
: null;
Expand Down

0 comments on commit 255224f

Please sign in to comment.