Skip to content

fix : ArchivePage createdAt undefined 에러 수정#58

Merged
IISweetHeartII merged 1 commit intomainfrom
dev
Jan 10, 2026
Merged

fix : ArchivePage createdAt undefined 에러 수정#58
IISweetHeartII merged 1 commit intomainfrom
dev

Conversation

@IISweetHeartII
Copy link
Contributor

memory.createdAt이 undefined일 때 split 에러 발생하는 문제 수정

@IISweetHeartII IISweetHeartII merged commit 0721d29 into main Jan 10, 2026
0 of 2 checks passed
@vercel
Copy link

vercel bot commented Jan 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
fe4 Building Building Preview, Comment Jan 10, 2026 11:19pm

@gemini-code-assist
Copy link

Summary of Changes

Hello @IISweetHeartII, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 ArchivePage에서 메모리 데이터를 처리할 때 memory.createdAt 필드가 정의되지 않아 발생할 수 있는 잠재적인 애플리케이션 충돌을 해결합니다. 이 변경사항은 데이터의 견고성을 높이고, createdAt 값이 누락된 메모리도 안정적으로 처리할 수 있도록 보장하여 사용자 경험을 개선합니다.

Highlights

  • createdAt 속성 오류 수정: ArchivePage에서 memory.createdAt 값이 undefined일 때 split 메서드 호출로 인해 발생하던 런타임 오류를 수정했습니다. createdAt 값이 없는 경우 해당 메모리 처리를 건너뛰도록 예외 처리를 추가했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

리뷰 코멘트를 확인해주세요.

const memoriesByDate = useMemo(() => {
const grouped: Record<string, Memory[]> = {};
memories.forEach((memory) => {
if (!memory.createdAt) return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

memory.createdAtundefined일 수 있는 경우를 처리하기 위해 가드 구문을 추가한 것은 좋습니다. 이로써 런타임 에러를 방지할 수 있습니다.

하지만 이는 src/types/memory.tsMemory 타입 정의와 실제 API 데이터 간의 불일치가 있음을 시사합니다. 현재 Memory 인터페이스에는 createdAtstring 타입의 필수 필드로 선언되어 있지만, 실제로는 undefined가 전달될 수 있는 것 같습니다.

장기적으로는 Memory 타입을 다음과 같이 수정하여 실제 데이터 모델을 정확하게 반영하는 것이 좋습니다.

export interface Memory {
  // ...
  createdAt?: string;
}

이렇게 하면 타입스크립트가 코드베이스 전체에서 createdAt 속성을 안전하지 않게 사용하는 다른 부분을 컴파일 시점에 감지하여 앱의 안정성을 높일 수 있습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant