From e6fa60b3e5776c6402137b80643979d0b628014d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Belli?= Date: Mon, 12 Jun 2017 13:11:18 +0200 Subject: [PATCH] Step 17.5: Filter user profile --- src/pages/profile/profile.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/profile/profile.ts b/src/pages/profile/profile.ts index 29c7be9b2..9d1cb86b2 100644 --- a/src/pages/profile/profile.ts +++ b/src/pages/profile/profile.ts @@ -22,9 +22,10 @@ export class ProfilePage implements OnInit { ) {} ngOnInit(): void { - this.profile = Meteor.user().profile || { - name: '' - }; + this.profile = (({name = '', pictureId} = {}) => ({ + name, + pictureId + }))(Meteor.user().profile); MeteorObservable.subscribe('user').subscribe(() => { let platform = this.platform.is('android') ? "android" :