From e9576dd33962d675978be6e5461f9303b811abae Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Thu, 28 Jul 2022 17:38:31 +0530 Subject: [PATCH] fix: ignore confirm save modal on same request selection even when no session --- .../hoppscotch-app/components/collections/my/Request.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/hoppscotch-app/components/collections/my/Request.vue b/packages/hoppscotch-app/components/collections/my/Request.vue index 0c633f4c6..eca0a947a 100644 --- a/packages/hoppscotch-app/components/collections/my/Request.vue +++ b/packages/hoppscotch-app/components/collections/my/Request.vue @@ -339,7 +339,14 @@ const selectRequest = () => { confirmChange.value = false setRestReq(props.request) } else if (!active.value) { - confirmChange.value = true + // If the current request is the same as the request to be loaded in, there is no data loss + const currentReq = getRESTRequest() + + if (isEqualHoppRESTRequest(currentReq, props.request)) { + setRestReq(props.request) + } else { + confirmChange.value = true + } } else { const currentReqWithNoChange = active.value.req const currentFullReq = getRESTRequest()