-
Notifications
You must be signed in to change notification settings - Fork 47
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 runtime error in isBezierIcon
function
#2348
Fix runtime error in isBezierIcon
function
#2348
Conversation
🦋 Changeset detectedLatest commit: ddcdeb9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2348 +/- ##
=======================================
Coverage 83.86% 83.86%
=======================================
Files 140 140
Lines 2919 2919
Branches 892 892
=======================================
Hits 2448 2448
Misses 441 441
Partials 30 30 ☔ View full report in Codecov by Sentry. |
@@ -6,7 +6,7 @@ | |||
const BEZIER_ICON_ID = '__bezier__icon' | |||
|
|||
export function isBezierIcon(arg: any) { | |||
return typeof arg === 'object' && arg[BEZIER_ICON_ID] === true | |||
return !!arg && typeof arg === 'object' && arg[BEZIER_ICON_ID] === true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
0464e1d
to
ddcdeb9
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @channel.io/[email protected] ### Patch Changes - Check if value is nullish in `isBezierIcon` function to block runtime error. ([#2348](#2348)) by @yangwooseong ## [email protected] ### Patch Changes - Updated dependencies - @channel.io/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Self Checklist
Related Issue
Summary
아래 함수에서 생길 수 있는 버그를 수정합니다. arg가 null 일 때 typeof arg === 'object' 이기 때문에 런타임 에러가 납니다.
Details
Breaking change? (Yes/No)
References