fix: birthday age

This commit is contained in:
David Ralph
2021-04-16 22:37:12 +01:00
parent bc065be590
commit de417f5fd1

View File

@@ -84,7 +84,7 @@ export default class Greeting extends React.PureComponent {
// Birthday
const birth = new Date(localStorage.getItem('birthday'));
if (localStorage.getItem('birthdayenabled') === 'true' && birth.getDate() === now.getDate() && birth.getMonth() === now.getMonth()) {
if (localStorage.getItem('birthdayage')) {
if (localStorage.getItem('birthdayage') === 'true') {
const text = this.language.birthday.split(' ');
message = `${text[0]} ${dtf.nth(this.calculateAge(birth))} ${text[1]}`;
} else {