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({