Skip to content

Commit

Permalink
clone deep
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Mar 16, 2021
1 parent b791d26 commit 0d26aca
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { __ } from '@wordpress/i18n';
import { useState, useMemo } from '@wordpress/element';
import { useInstanceId } from '@wordpress/compose';
import { chevronRight } from '@wordpress/icons';
import { cloneBlock } from '@wordpress/blocks';
import {
MenuGroup,
MenuItem,
Expand Down Expand Up @@ -90,9 +89,7 @@ function PatternTransformationsMenu( {
// to mutate this prop.
const pattern = {
...statePattern,
transformedBlocks: statePattern.contentBlocks.map(
cloneBlock
),
transformedBlocks: cloneDeep( statePattern.contentBlocks ),
};
const { transformedBlocks: patternBlocks } = pattern;
const transformedBlocksSet = new Set();
Expand Down

0 comments on commit 0d26aca

Please sign in to comment.