From 66e5808e4e899abe03fff9ee8a29b6fccf302467 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 17 Jul 2020 12:00:43 +0200 Subject: [PATCH] Clicking the popup doesn't cause the login to appear anymore --- Logic/OsmConnection.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Logic/OsmConnection.ts b/Logic/OsmConnection.ts index 66a4719..648d9bb 100644 --- a/Logic/OsmConnection.ts +++ b/Logic/OsmConnection.ts @@ -123,11 +123,12 @@ export class OsmConnection { public preferenceSources : any = {} public GetPreference(key: string) : UIEventSource{ - if(this.preferenceSources[key] !== undefined){ + if (this.preferenceSources[key] !== undefined) { return this.preferenceSources[key]; } - this.UpdatePreferences(); - console.log("Getting preference object", key, "currently upstreamed as ",this.preferences.data[key] ); + if (this.userDetails.data.loggedIn) { + this.UpdatePreferences(); + } const pref = new UIEventSource(this.preferences.data[key]); pref.addCallback((v) => { this.SetPreference(key, v);