Skip to content

fix: 푸쉬알림 수정#118

Merged
Yeeyahou merged 1 commit into
devfrom
fix/#116
May 29, 2026
Merged

fix: 푸쉬알림 수정#118
Yeeyahou merged 1 commit into
devfrom
fix/#116

Conversation

@Yeeyahou

Copy link
Copy Markdown
Contributor

🚀 Summary


✨ Description


🎲 Issue Number

close #{Issue Number}

Copilot AI review requested due to automatic review settings May 29, 2026 08:46
@vercel

vercel Bot commented May 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
dealit Ready Ready Preview, Comment May 29, 2026 8:47am

@Yeeyahou
Yeeyahou merged commit f355634 into dev May 29, 2026
3 of 4 checks passed

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

이번 풀 리퀘스트는 포그라운드 알림 표시 로직을 별도의 showForegroundNotification 함수로 분리하여 코드의 가독성을 높이고 구조를 개선했습니다. 리뷰에서는 일부 브라우저 환경에서 navigator.serviceWorker가 정의되지 않아 발생할 수 있는 런타임 에러를 방지하기 위해, 서비스 워커 지원 여부를 사전에 검사하는 방어 코드를 추가할 것을 제안하고 있습니다.

Comment on lines +70 to +72
const registration = await navigator.serviceWorker.getRegistration(
"/firebase-cloud-messaging-push-scope",
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

일부 브라우저 환경(예: 보안되지 않은 컨텍스트(HTTP) 또는 특정 브라우저의 프라이빗 모드)에서는 navigator.serviceWorker가 정의되지 않을 수 있습니다. 이로 인해 발생할 수 있는 런타임 에러를 방지하기 위해 serviceWorker 지원 여부를 먼저 확인하는 안전장치를 추가하는 것이 좋습니다.

  const registration = "serviceWorker" in navigator
    ? await navigator.serviceWorker.getRegistration(
        "/firebase-cloud-messaging-push-scope",
      )
    : undefined;

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

3 participants