-
Notifications
You must be signed in to change notification settings - Fork 6
fix(PrismCode): accept nullish values #693
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
🦋 Changeset detectedLatest commit: fa70375 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
❌ Deploy Preview for cube-uikit-docs failed.
|
📦 NPM canary releaseDeployed canary version 0.0.0-canary-215df3c. |
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 updates the PrismCode component to accept nullish code values and normalize them to an empty string.
- Adjust destructuring and add a nullish check for
code - Include a changeset entry documenting the new behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/components/content/PrismCode/PrismCode.tsx | Allow code prop to be null/undefined by normalizing to '' |
| .changeset/fair-cycles-design.md | Document patch release for nullish support |
Comments suppressed due to low confidence (2)
src/components/content/PrismCode/PrismCode.tsx:85
- Add unit tests to verify that
PrismCodecorrectly handlesnullandundefinedfor thecodeprop to prevent regressions.
if (!code) {
src/components/content/PrismCode/PrismCode.tsx:89
- Update the component's documentation or TypeScript definitions to indicate that
codecan be nullish and will be normalized to an empty string.
if (typeof code !== 'string' && code) {
🏗 Docs are successfully deployed!👀 Preview: https://6842a6b3b309c078e50ebbde--cube-uikit-docs.netlify.app |
🧪 Storybook is successfully deployed!
|
🏋️ Size limit report
Click here if you want to find out what is changed in this build |
No description provided.