refactor: remove legacy global env preRequest reference

This commit is contained in:
Andrew Bastin
2021-08-17 14:41:23 +05:30
parent c23a4bf75d
commit 91fee8d2d0
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import { import {
getCurrentEnvironment, getCurrentEnvironment,
getLegacyGlobalEnvironment, getGlobalVariables,
} from "~/newstore/environments" } from "~/newstore/environments"
export default function getEnvironmentVariablesFromScript(script: string) { export default function getEnvironmentVariablesFromScript(script: string) {
@@ -12,10 +12,10 @@ export default function getEnvironmentVariablesFromScript(script: string) {
_variables[variable.key] = variable.value _variables[variable.key] = variable.value
} }
const globalEnv = getLegacyGlobalEnvironment() const globalEnv = getGlobalVariables()
if (globalEnv) { if (globalEnv) {
for (const variable of globalEnv.variables) { for (const variable of globalEnv) {
_variables[variable.key] = variable.value _variables[variable.key] = variable.value
} }
} }