-
Notifications
You must be signed in to change notification settings - Fork 111
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: Prevent crashes when accessing cluster details #911
base: main
Are you sure you want to change the base?
Conversation
onClose = () => { | ||
this.props.onClose(); | ||
this.resetField(); | ||
}; | ||
|
||
onOk = () => { | ||
const { editMode, cluster } = this.state; | ||
const { editClusterName } = this.props; |
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.
What's the need for this code change?
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.
What's the need for this code change?
Thank you for pointing this out! I'll go ahead and remove it to clean up the code.
- Added optional chaining to safely access cluster details in `AddClusterDialog`. This fix addresses the issue where the page crashes when trying to load details for an inaccessible cluster. Signed-off-by: am6737 <1359816810@qq.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #911 +/- ##
==========================================
- Coverage 59.01% 51.06% -7.96%
==========================================
Files 116 116
Lines 19846 16511 -3335
==========================================
- Hits 11713 8431 -3282
- Misses 6696 6835 +139
+ Partials 1437 1245 -192
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
AddClusterDialog
.This fix addresses the issue where the page crashes when trying to load details for an inaccessible cluster.
Description of your changes
Fixes #685
I have:
yarn lint
to ensure the frontend changes are ready for review.make reviewable
to ensure the server changes are ready for review.backport release-x.y
labels to auto-backport this PR if necessary.Special notes for your reviewer