about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2025-07-23 21:01:32 -0500
committerGitHub <noreply@github.com>2025-07-23 21:01:32 -0500
commit3775aeb1463e76c8b4f8380146b2aafbdb03dba4 (patch)
treeb9879331f23934b7cca1d550294adb818212e044 /src
parent6a7b8a279b6113def5d6330ef40801a5484a0b7c (diff)
downloadvoidsky-3775aeb1463e76c8b4f8380146b2aafbdb03dba4.tar.zst
If birth date is not set, ensure AA still shows (#8709)
Diffstat (limited to 'src')
-rw-r--r--src/state/ageAssurance/useAgeAssurance.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state/ageAssurance/useAgeAssurance.ts b/src/state/ageAssurance/useAgeAssurance.ts
index 0215cc88d..061384868 100644
--- a/src/state/ageAssurance/useAgeAssurance.ts
+++ b/src/state/ageAssurance/useAgeAssurance.ts
@@ -28,7 +28,8 @@ export function useAgeAssurance(): AgeAssurance {
 
   return useMemo(() => {
     const isReady = aa.isReady && preferencesLoaded
-    const isDeclaredUnderage = (declaredAge || 0) < 18
+    const isDeclaredUnderage =
+      declaredAge !== undefined ? declaredAge < 18 : false
     const state: AgeAssurance = {
       isReady,
       status: aa.status,