From 4b0f683901ea8bf6fe9e6c5f37b9b271f159aec3 Mon Sep 17 00:00:00 2001 From: Raymonzut <40148684+Raymonzut@users.noreply.github.com> Date: Sat, 26 Sep 2020 18:25:41 +0200 Subject: [PATCH] Remove unneeded curly braces --- client/public/lib/me.mjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/public/lib/me.mjs b/client/public/lib/me.mjs index 8daaa17..768190a 100644 --- a/client/public/lib/me.mjs +++ b/client/public/lib/me.mjs @@ -4,14 +4,14 @@ export function age() { let age = now.getFullYear() - birthdate.getFullYear() - if (now.getMonth() < birthdate.getMonth()) { + if (now.getMonth() < birthdate.getMonth()) age-- - } + if ( birthdate.getMonth() === now.getMonth() && now.getDate() < birthdate.getDate() - ) { + ) age-- - } + return age }