Remove unneeded curly braces

This commit is contained in:
Raymonzut
2020-09-26 18:25:41 +02:00
parent 7a23117328
commit 4b0f683901
+4 -4
View File
@@ -4,14 +4,14 @@ export function age() {
let age = now.getFullYear() - birthdate.getFullYear() let age = now.getFullYear() - birthdate.getFullYear()
if (now.getMonth() < birthdate.getMonth()) { if (now.getMonth() < birthdate.getMonth())
age-- age--
}
if ( if (
birthdate.getMonth() === now.getMonth() && birthdate.getMonth() === now.getMonth() &&
now.getDate() < birthdate.getDate() now.getDate() < birthdate.getDate()
) { )
age-- age--
}
return age return age
} }