(js) Improve Card initialization

pull/201/head
Francis Lachapelle 2016-03-04 11:08:38 -05:00
parent 9dd5dc4c47
commit cb03a1d97e
1 changed files with 3 additions and 1 deletions

View File

@ -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;