Skip to content

Commit

Permalink
avoid reassignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 5, 2024
1 parent 5388716 commit ca7fa6d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/block-editor/src/components/block-preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ export function BlockPreview( {
);
}

BlockPreview = memo( BlockPreview );
BlockPreview.Async = Async;
const MemoizedBlockPreview = memo( BlockPreview );

MemoizedBlockPreview.Async = Async;

/**
* BlockPreview renders a preview of a block or array of blocks.
Expand All @@ -101,7 +102,7 @@ BlockPreview.Async = Async;
*
* @return {Component} The component to be rendered.
*/
export default BlockPreview;
export default MemoizedBlockPreview;

/**
* This hook is used to lightly mark an element as a block preview wrapper
Expand Down

0 comments on commit ca7fa6d

Please sign in to comment.