Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
Add firebase sync code for new environment state system
Andrew Bastin6ea9d16f8759
diff --git a/helpers/fb.js b/helpers/fb.jsindex 730e25857..d0adde190 100644--- a/helpers/fb.js+++ b/helpers/fb.js@@ -46,7 +46,6 @@ export class FirebaseInstance {this.idToken = nullthis.currentFeeds = []this.currentSettings = []- this.currentEnvironments = []this.currentUser$ = new ReplaySubject(1)this.idToken$ = new ReplaySubject(1)@@ -56,7 +55,7 @@ export class FirebaseInstance {let loadedGraphqlHistory = falselet loadedRESTCollections = falselet loadedGraphqlCollections = false- const loadedEnvironments = false+ let loadedEnvironments = falsegraphqlCollectionStore.subject$.subscribe(({ state }) => {if (@@ -300,9 +299,10 @@ export class FirebaseInstance {environment.id = doc.idenvironments.push(environment)})- if (environments.length > 0) {- this.currentEnvironments = environments[0].environment- }++ loadedEnvironments = false+ replaceEnvironments(environments)+ loadedEnvironments = true})} else {this.currentUser = null