Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix: ignore confirm save modal on same request selection even when no session

Andrew Bastine9576dd33962
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()