-
Notifications
You must be signed in to change notification settings - Fork 0
bugfix: Fixed an error that occurred when undefined was entered in unescapeHtml and escapeHtml #44
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
Conversation
…escapeHtml and escapeHtml
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
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.
Pull Request Overview
This PR fixes a runtime error that occurred when undefined or null values were passed to the escapeHtml and unescapeHtml utility functions. The functions now return null or undefined as-is instead of throwing errors.
- Added null/undefined guards to both functions to handle edge cases gracefully
- Enhanced test coverage with comprehensive test suites including null/undefined scenarios
- Improved code organization by wrapping tests in describe blocks
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| package/stringUtil/unescapeHtml/index.ts | Added null check guard and reformatted function for better readability |
| package/stringUtil/unescapeHtml/index.test.ts | Added comprehensive test suite with null/undefined handling tests |
| package/stringUtil/escapeHtml/index.ts | Added null check guard to prevent runtime errors |
| package/stringUtil/escapeHtml/index.test.ts | Added comprehensive test suite with null/undefined handling tests |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
prgmr99
left a comment
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.
고생하셨습니다~~!! 👍
Description
closes: #42