diff --git a/packages/builder/src/components/userInterface/pagesParsing/createProps.js b/packages/builder/src/components/userInterface/pagesParsing/createProps.js index 44d23c5c3e..b628b6e15b 100644 --- a/packages/builder/src/components/userInterface/pagesParsing/createProps.js +++ b/packages/builder/src/components/userInterface/pagesParsing/createProps.js @@ -1,4 +1,4 @@ -import { isString, isUndefined } from "lodash/fp" +import { isString, isUndefined, cloneDeep } from "lodash/fp" import { TYPE_MAP } from "./types" import { assign } from "lodash" import { uuid } from "builderStore/uuid" @@ -83,13 +83,13 @@ const parsePropDef = propDef => { if (isString(propDef)) { if (!TYPE_MAP[propDef]) return error(`Type ${propDef} is not recognised.`) - return TYPE_MAP[propDef].default + return cloneDeep(TYPE_MAP[propDef].default) } const type = TYPE_MAP[propDef.type] if (!type) return error(`Type ${propDef.type} is not recognised.`) - return propDef.default + return cloneDeep(propDef.default) } export const arrayElementComponentName = (parentComponentName, arrayPropName) =>