fix: additional envs

This commit is contained in:
liyasthomas
2022-02-19 18:29:43 +05:30
parent b3f05c42e8
commit 578148f45f
4 changed files with 82 additions and 23 deletions

View File

@@ -1,13 +1,14 @@
import { runPreRequestScript } from "@hoppscotch/js-sandbox"
import { Environment } from "@hoppscotch/data"
import cloneDeep from "lodash/cloneDeep"
import {
getCurrentEnvironment,
getGlobalVariables,
} from "~/newstore/environments"
export const getCombinedEnvVariables = () => ({
global: getGlobalVariables(),
selected: getCurrentEnvironment().variables,
global: cloneDeep(getGlobalVariables()),
selected: cloneDeep(getCurrentEnvironment().variables),
})
export const getFinalEnvsFromPreRequest = (