-
-
Notifications
You must be signed in to change notification settings - Fork 532
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: avoid badges with undefined
class
#2086
fix: avoid badges with undefined
class
#2086
Conversation
🦋 Changeset detectedLatest commit: cb7c2c0 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 ↗︎
|
Thanks @julien-deramond! I remember seeing this bug before and forgot about it. It’s technically a more general Astro bug, so I opened this issue: withastro/astro#11413 Ideally, we should fix it in Astro so that our usage can remain unchanged (because this bug could impact various Astro users, not only Starlight), but I’ll see what the feedback is on that issue. If it looks like we won’t be able to fix it upstream in a timely manner, we can use this PR in Starlight instead. |
Proposed a fix: withastro/compiler#1014 |
This should be fixed by withastro/compiler#1014 in the next release of the compiler. Thanks again for bringing our attention to it! |
Great job fixing it upstream! 💪 |
Description
In the actual Starlight documentation at https://starlight.astro.build/fr/getting-started/, the "New" badge in the sidemenu contains a class named "undefined".
This PR suggests a possible fix in the
SidebarSublist
Astro component directly to create an empty string if theentry.badge.class
var is undefined.Please note that:
Don't hesitate to nuke this PR or update it directly if there's a better way to fix that. I can also just close it if the quality is not there, and just create an issue instead :)