Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Fixed Uncaught TypeError: Cannot read property 'get' of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
jkleinsc committed Sep 29, 2016
1 parent ad0e405 commit d8610cc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/mixins/dob-days.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,28 @@ export default Ember.Mixin.create({
days: days,
months: months
};
let t = this.get('i18n').t;
let i18n = this.get('i18n');
if (shortFormat) {
if (years > 0) {
formatString = t('dates.short', options);
formatString = i18n.t('dates.short', options);
} else {
formatString = t('dates.shortOmitYears', options);
formatString = i18n.t('dates.shortOmitYears', options);
}
} else if (omitDays) {
if (years > 1) {
formatString = t('dates.longOmitDaysPlural', options);
formatString = i18n.t('dates.longOmitDaysPlural', options);
} else if (years === 1) {
formatString = t('dates.longOmitDays', options);
formatString = i18n.t('dates.longOmitDays', options);
} else {
formatString = t('dates.longOmitDaysYears', options);
formatString = i18n.t('dates.longOmitDaysYears', options);
}
} else {
if (years > 1) {
formatString = t('dates.longPlural', options);
formatString = i18n.t('dates.longPlural', options);
} else if (years === 1) {
formatString = t('dates.long', options);
formatString = i18n.t('dates.long', options);
} else {
formatString = t('dates.longOmitYears', options);
formatString = i18n.t('dates.longOmitYears', options);
}
}
return formatString;
Expand Down

0 comments on commit d8610cc

Please sign in to comment.