From 0f32e06f04f0e67e03a0332171f7227c3399dec2 Mon Sep 17 00:00:00 2001 From: nivedin Date: Tue, 17 Oct 2023 13:39:27 +0530 Subject: [PATCH] fix: global environment test set bug --- .../hoppscotch-common/src/helpers/RequestRunner.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/hoppscotch-common/src/helpers/RequestRunner.ts b/packages/hoppscotch-common/src/helpers/RequestRunner.ts index 93e0bba8d..a43451dc7 100644 --- a/packages/hoppscotch-common/src/helpers/RequestRunner.ts +++ b/packages/hoppscotch-common/src/helpers/RequestRunner.ts @@ -131,15 +131,10 @@ export function runRESTRequest$( tab.value.document.testResults = translateToSandboxTestResults( runResult.right ) + + setGlobalEnvVariables([...runResult.right.envs.global]) + if ( - environmentsStore.value.selectedEnvironmentIndex.type === - "NO_ENV_SELECTED" - ) { - setGlobalEnvVariables([ - ...runResult.right.envs.global, - ...runResult.right.envs.selected, - ]) - } else if ( environmentsStore.value.selectedEnvironmentIndex.type === "MY_ENV" ) { const env = getEnvironment({