Skip to content

Commit

Permalink
PostFormat suggestion: fix double parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 17, 2023
1 parent 4609399 commit 7d73069
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packages/editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
getFreeformContentHandlerName,
getDefaultBlockName,
__unstableSerializeAndClean,
parse,
} from '@wordpress/blocks';
import { isInTheFuture, getDate } from '@wordpress/date';
import { addQueryArgs, cleanForSlug } from '@wordpress/url';
Expand Down Expand Up @@ -1102,16 +1101,8 @@ export const isPublishSidebarEnabled = createRegistrySelector(
* @return {Array} Block list.
*/
export const getEditorBlocks = createSelector(
( state ) => {
return (
getEditedPostAttribute( state, 'blocks' ) ||
parse( getEditedPostContent( state ) )
);
},
( state ) => [
getEditedPostAttribute( state, 'blocks' ),
getEditedPostContent( state ),
]
() => getBlocks(),
() => [ getBlocks() ]
);

/**
Expand Down

0 comments on commit 7d73069

Please sign in to comment.