diff --git a/Logic/OsmConnection.ts b/Logic/OsmConnection.ts index 66a4719d3..648d9bbb5 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);