Skip to content
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: Ensure UUIDTag Component Handles Non-String UUID Values Safely #1803

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

yunchipang
Copy link
Collaborator

Description

  • Added a type check for uuid, converting it to a string or an empty string if uuid is undefined or not a string, and confirmed that .slice() operates correctly without causing runtime errors.
  • Added a cypress component test for UUIDTag

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Before After
Screenshot 2024-10-28 at 6 51 39 PM image

How Has This Been Tested?

  • Cypress integration
  • Cypress component tests
  • Jest unit tests
image image

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@yunchipang yunchipang requested a review from dadiorchen October 29, 2024 03:10
@@ -0,0 +1,24 @@
import UUIDTag from './UUIDTag';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, this is great

@dadiorchen dadiorchen merged commit f682c52 into Greenstand:v2 Oct 30, 2024
3 checks passed
@yunchipang yunchipang deleted the fix/handle-non-string-uuid branch October 30, 2024 14:59
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.

2 participants