diff --git a/packages/hoppscotch-app/components/collections/my/Request.vue b/packages/hoppscotch-app/components/collections/my/Request.vue index abeb983e3..0da5f2b07 100644 --- a/packages/hoppscotch-app/components/collections/my/Request.vue +++ b/packages/hoppscotch-app/components/collections/my/Request.vue @@ -162,8 +162,8 @@ import { HoppRESTRequest, safelyExtractRESTRequest, translateToNewRequest, + isEqualHoppRESTRequest, } from "@hoppscotch/data" -import isEqual from "lodash/isEqual" import * as E from "fp-ts/Either" import { useI18n, @@ -349,9 +349,9 @@ const selectRequest = () => { const currentFullReq = getRESTRequest() // Check if whether user clicked the same request or not - if (!isActive.value) { + if (!isActive.value && currentReqWithNoChange !== undefined) { // Check if there is any changes done on the current request - if (isEqual(currentReqWithNoChange, currentFullReq)) { + if (isEqualHoppRESTRequest(currentReqWithNoChange, currentFullReq)) { setRestReq(props.request) if (props.saveRequest) emit("select", { diff --git a/packages/hoppscotch-app/components/collections/teams/Request.vue b/packages/hoppscotch-app/components/collections/teams/Request.vue index 477e61e23..ad33ee0e6 100644 --- a/packages/hoppscotch-app/components/collections/teams/Request.vue +++ b/packages/hoppscotch-app/components/collections/teams/Request.vue @@ -157,11 +157,11 @@ import { ref, computed } from "@nuxtjs/composition-api" import { HoppRESTRequest, + isEqualHoppRESTRequest, safelyExtractRESTRequest, translateToNewRequest, } from "@hoppscotch/data" import * as E from "fp-ts/Either" -import isEqual from "lodash/isEqual" import { useI18n, useToast, @@ -277,8 +277,7 @@ const isActive = computed( () => active.value && active.value.originLocation === "team-collection" && - active.value.requestID === props.requestIndex && - isEqual(active.value.req, props.request) + active.value.requestID === props.requestIndex ) const dragStart = ({ dataTransfer }: DragEvent) => { @@ -333,9 +332,9 @@ const selectRequest = () => { const currentFullReq = getRESTRequest() // Check if whether user clicked the same request or not - if (!isActive.value) { + if (!isActive.value && currentReqWithNoChange) { // Check if there is any changes done on the current request - if (isEqual(currentReqWithNoChange, currentFullReq)) { + if (isEqualHoppRESTRequest(currentReqWithNoChange, currentFullReq)) { setRestReq(props.request) if (props.saveRequest) emit("select", { diff --git a/packages/hoppscotch-app/components/history/index.vue b/packages/hoppscotch-app/components/history/index.vue index f757d4c79..2d8b653be 100644 --- a/packages/hoppscotch-app/components/history/index.vue +++ b/packages/hoppscotch-app/components/history/index.vue @@ -113,13 +113,16 @@