Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Fix props clone (#568)
Roman Pominove8c52bd58903
diff --git a/packages/project/src/db/props.ts b/packages/project/src/db/props.tsindex 0877deb09f..568c0b9246 100644--- a/packages/project/src/db/props.ts+++ b/packages/project/src/db/props.ts@@ -127,23 +127,16 @@ export const clone = async (const props = await client.instanceProps.findMany({where: { treeId: previousTreeId },});+if (props.length === 0) return;const data = props.map(({ id: _id, treeId: _treeId, ...rest }) => ({...rest,treeId: nextTreeId,}));- const create = async (client: Prisma.TransactionClient) =>- data.map((prop) =>- client.instanceProps.create({- data: prop,- })- );-- // If our client is not a transaction client, we need to create a transaction- "$transaction" in client- ? await client.$transaction(create)- : await create(client);+ for (const prop of data) {+ await client.instanceProps.create({ data: prop });+ }};export const patch = async (