Skip to content

Commit b956099

Browse files
committed
feat: fetchTodos 메서드 내부 createAt에 대해 방어코드 추가
1 parent a1f5e2f commit b956099

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/home/todoService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const fetchTodos = async (uid: string): Promise<Todo[]> => {
2727
return snapshot.docs.map((doc) => ({
2828
id: doc.id,
2929
...doc.data(),
30-
createAt: doc.data().createAt.toDate(),
30+
createAt: doc.data().createAt.toDate() ?? new Date(),
3131
})) as Todo[];
3232
};
3333

0 commit comments

Comments
 (0)