From 563b0cc077c1d8669caa8869f1a6470a9f5f2c70 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 23 Feb 2021 10:26:37 +0000 Subject: [PATCH] Only performing the change on copies, allowing cuts through. --- packages/builder/src/builderStore/store/frontend.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/builderStore/store/frontend.js b/packages/builder/src/builderStore/store/frontend.js index 51ed83266a..7edc378900 100644 --- a/packages/builder/src/builderStore/store/frontend.js +++ b/packages/builder/src/builderStore/store/frontend.js @@ -409,12 +409,16 @@ export const getFrontendStore = () => { return state } + // defines if this is a copy or a cut + const cut = state.componentToPaste.isCut + // immediately need to remove bindings, currently these aren't valid when pasted - state.componentToPaste = removeBindings(state.componentToPaste) + if (!cut) { + state.componentToPaste = removeBindings(state.componentToPaste) + } // Clone the component to paste // Retain the same ID if cutting as things may be referencing this component - const cut = state.componentToPaste.isCut delete state.componentToPaste.isCut let componentToPaste = cloneDeep(state.componentToPaste) if (cut) {