From 54dd243ce467b8b2b46a3cc63d638709e38a338d Mon Sep 17 00:00:00 2001 From: Mike Fitzpatrick Date: Tue, 29 May 2018 19:27:21 -0400 Subject: [PATCH] - profile storage fixes --- src/services/profiles.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/profiles.ts b/src/services/profiles.ts index f4402c8..ae6b462 100644 --- a/src/services/profiles.ts +++ b/src/services/profiles.ts @@ -9,12 +9,12 @@ export class ProfileService { fallback: string = 'assets/data/profiles.json'; epSubmitted: string = '/submitted'; epVerified: string = '/verified'; - idMap: any = { all: {}, submitted: {}, verified: {} }; + idMap: any; profiles: any; constructor(private http: Http) { - this.idMap = {}; + this.idMap = { all: {}, submitted: {}, verified: {} }; this.profiles = null; } @@ -53,6 +53,7 @@ export class ProfileService { .map(res => res.json()) .subscribe( data => { + this.idMap = this.profiles = this.profiles || {}; this.profiles[type] = data; this.profiles[type].reduce((map, profile, i) => {