(js) Improve Card initialization

This commit is contained in:
Francis Lachapelle
2016-03-04 11:08:38 -05:00
parent 9dd5dc4c47
commit cb03a1d97e
@@ -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;