소스 검색

fix: null type error

GyDi 3 년 전
부모
커밋
4f56c38599
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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;