Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

fix: typo in getEnvironment (#2434)

Chun-Hao Lien16be7c38f31d
diff --git a/packages/hoppscotch-app/components/environments/Details.vue b/packages/hoppscotch-app/components/environments/Details.vue
index 81c64e142..e28e5ab13 100644
--- a/packages/hoppscotch-app/components/environments/Details.vue
+++ b/packages/hoppscotch-app/components/environments/Details.vue
@@ -124,7 +124,7 @@ import { refAutoReset } from "@vueuse/core"
import {
createEnvironment,
environments$,
- getEnviroment,
+ getEnvironment,
getGlobalVariables,
globalEnv$,
setCurrentEnvironment,
@@ -178,7 +178,7 @@ const workingEnv = computed(() => {
variables: props.envVars(),
}
} else if (props.editingEnvironmentIndex !== null) {
- return getEnviroment(props.editingEnvironmentIndex)
+ return getEnvironment(props.editingEnvironmentIndex)
} else {
return null
}
diff --git a/packages/hoppscotch-app/helpers/RequestRunner.ts b/packages/hoppscotch-app/helpers/RequestRunner.ts
index 5265e4142..a6e38ce81 100644
--- a/packages/hoppscotch-app/helpers/RequestRunner.ts
+++ b/packages/hoppscotch-app/helpers/RequestRunner.ts
@@ -25,7 +25,7 @@ import { getRESTRequest, setRESTTestResults } from "~/newstore/RESTSession"
import {
environmentsStore,
getCurrentEnvironment,
- getEnviroment,
+ getEnvironment,
getGlobalVariables,
setGlobalEnvVariables,
updateEnvironment,
@@ -97,7 +97,7 @@ export const runRESTRequest$ = (): TaskEither<
setGlobalEnvVariables(runResult.right.envs.global)
if (environmentsStore.value.currentEnvironmentIndex !== -1) {
- const env = getEnviroment(
+ const env = getEnvironment(
environmentsStore.value.currentEnvironmentIndex
)
updateEnvironment(
diff --git a/packages/hoppscotch-app/newstore/environments.ts b/packages/hoppscotch-app/newstore/environments.ts
index 75fa93c44..c7d282481 100644
--- a/packages/hoppscotch-app/newstore/environments.ts
+++ b/packages/hoppscotch-app/newstore/environments.ts
@@ -540,6 +540,6 @@ export function updateEnvironmentVariable(
})
}
-export function getEnviroment(index: number) {
+export function getEnvironment(index: number) {
return environmentsStore.value.environments[index]
}