Skip to content

Commit

Permalink
fix(performance): use cloneDeepSchema for cloning the schema to avoid…
Browse files Browse the repository at this point in the history
… potential errors
  • Loading branch information
ichim-david committed Nov 15, 2023
1 parent 48f4fb5 commit 8954fc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/manage/Blocks/MetadataSection/variations.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { TableSchema } from './schema';
import { cloneDeep } from 'lodash';
import { cloneDeepSchema } from '@plone/volto/helpers/Utils/Utils';

export const addTableField = ({ schema, intl }) => {
const applied = schema.fieldsets[0].fields.includes('table');

if (!applied) {
const resSchema = cloneDeep(schema);
const resSchema = cloneDeepSchema(schema);

resSchema.fieldsets.push({
id: 'tableStyle',
Expand Down

0 comments on commit 8954fc0

Please sign in to comment.