From 8c050849945149a5b2dd9cf2af150a92d6483eee Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Tue, 16 Nov 2021 15:22:18 +0530 Subject: [PATCH] fix: issue with the request body from duplication being linked in memory fixes #1954 --- .../hoppscotch-app/components/collections/graphql/index.vue | 2 +- packages/hoppscotch-app/components/collections/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/hoppscotch-app/components/collections/graphql/index.vue b/packages/hoppscotch-app/components/collections/graphql/index.vue index 0305f0102..d490eed13 100644 --- a/packages/hoppscotch-app/components/collections/graphql/index.vue +++ b/packages/hoppscotch-app/components/collections/graphql/index.vue @@ -290,7 +290,7 @@ export default defineComponent({ }, duplicateRequest({ folderPath, request }) { saveGraphqlRequestAs(folderPath, { - ...request, + ...cloneDeep(request), name: `${request.name} - ${this.$t("action.duplicate")}`, }) }, diff --git a/packages/hoppscotch-app/components/collections/index.vue b/packages/hoppscotch-app/components/collections/index.vue index e410afbac..e968e292e 100644 --- a/packages/hoppscotch-app/components/collections/index.vue +++ b/packages/hoppscotch-app/components/collections/index.vue @@ -688,7 +688,7 @@ export default defineComponent({ }, duplicateRequest({ folderPath, request }) { saveRESTRequestAs(folderPath, { - ...request, + ...cloneDeep(request), name: `${request.name} - ${this.$t("action.duplicate")}`, }) },