Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix(common): prevent exceptions with open shared requests in new tab action (#3835)
James George342532c9b1d5
diff --git a/packages/hoppscotch-common/src/components/share/Request.vue b/packages/hoppscotch-common/src/components/share/Request.vueindex 44a04c473..97ac09e71 100644--- a/packages/hoppscotch-common/src/components/share/Request.vue+++ b/packages/hoppscotch-common/src/components/share/Request.vue@@ -62,7 +62,7 @@:shortcut="['T']"@click="() => {- openInNewTab()+ emit('open-shared-request', parseRequest)hide()}"@@ -128,6 +128,7 @@ const emit = defineEmits<{embedProperties?: string | null): void(e: "delete-shared-request", codeID: string): void+ (e: "open-shared-request", request: HoppRESTRequest): void}>()const tippyActions = ref<TippyComponent | null>(null)diff --git a/packages/hoppscotch-common/src/components/share/index.vue b/packages/hoppscotch-common/src/components/share/index.vueindex bfdbb64c0..34fc95967 100644--- a/packages/hoppscotch-common/src/components/share/index.vue+++ b/packages/hoppscotch-common/src/components/share/index.vue@@ -53,6 +53,7 @@:request="request"@customize-shared-request="customizeSharedRequest"@delete-shared-request="deleteSharedRequest"+ @open-shared-request="openRequestInNewTab"/><HoppSmartIntersectionv-if="hasMoreSharedRequests"@@ -483,6 +484,13 @@ const getErrorMessage = (err: GQLError<string>) => {}}+const openRequestInNewTab = (request: HoppRESTRequest) => {+ restTab.createNewTab({+ isDirty: false,+ request,+ })+}+defineActionHandler("share.request", ({ request }) => {requestToShare.value = requestdisplayShareRequestModal(true)