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: environments not being written correctly

Andrew Bastin09365bcabe30
diff --git a/packages/hoppscotch-app/helpers/fb/environments.ts b/packages/hoppscotch-app/helpers/fb/environments.ts
index 3633a27de..6452430d8 100644
--- a/packages/hoppscotch-app/helpers/fb/environments.ts
+++ b/packages/hoppscotch-app/helpers/fb/environments.ts
@@ -43,13 +43,15 @@ async function writeEnvironments(environment: Environment[]) {
environment,
}
+ console.log(ev)
+
try {
await setDoc(
doc(
getFirestore(),
"users",
currentUser$.value.uid,
- "envrionments",
+ "environments",
"sync"
),
ev
@@ -85,6 +87,7 @@ async function writeGlobalEnvironment(variables: Environment["variables"]) {
export function initEnvironments() {
environments$.subscribe((envs) => {
+ console.log("env update")
if (
currentUser$.value &&
settingsStore.value.syncEnvironments &&