Selaa lähdekoodia

fix: null type error

GyDi 3 vuotta sitten
vanhempi
commit
4f56c38599
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      src/pages/profile.tsx

+ 1 - 0
src/pages/profile.tsx

@@ -22,6 +22,7 @@ const ProfilePage = () => {
 
   useEffect(() => {
     if (profiles.current == null) return;
+    if (!profiles.items) profiles.items = [];
 
     const profile = profiles.items![profiles.current];
     if (!profile) return;