From cb03a1d97e95dee81f6344b5a7f731a46c8110b9 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 4 Mar 2016 11:08:38 -0500 Subject: [PATCH] (js) Improve Card initialization --- UI/WebServerResources/js/Contacts/Card.service.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UI/WebServerResources/js/Contacts/Card.service.js b/UI/WebServerResources/js/Contacts/Card.service.js index 87967a5d0..890f79e10 100644 --- a/UI/WebServerResources/js/Contacts/Card.service.js +++ b/UI/WebServerResources/js/Contacts/Card.service.js @@ -471,7 +471,9 @@ }); if (_this.birthday) { _this.birthday = new Date(_this.birthday * 1000); - _this.$birthday = Card.$Preferences.$mdDateLocaleProvider.formatDate(_this.birthday); + Card.$Preferences.ready().then(function() { + _this.$birthday = Card.$Preferences.$mdDateLocaleProvider.formatDate(_this.birthday); + }); } // Mark card as loaded _this.$loaded = Card.STATUS.LOADED;