Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : mainheader uncatch type err 문제 #481

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions frontend/src/header/mainHeader/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,13 @@ export default function MainHeader($container) {
};

this.renderFriendsList = () => {
// 상태 관리 시스템으로부터 현재 친구 목록 상태를 가져옵니다.
// 상태 관리 시스템으로부터 현재 친구 목록 상태를 가져옴.
const newFriendList = getFriendsList();
// 새로운 친구 목록을 기반으로 친구 카드를 생성합니다.
const newFriendCards = newFriendList.friends
// friends가 배열인지 확인하고, 아니라면 빈 배열을 사용.
const friends = Array.isArray(newFriendList.friends) ? newFriendList.friends : [];

// 새로운 친구 목록을 기반으로 친구 카드를 생성.
const newFriendCards = friends
.slice(0, 8)
.map((card, index) =>
createInfoCard(
Expand Down
Loading