-
-
Notifications
You must be signed in to change notification settings - Fork 130
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 Sidebar.tsx #1110
fix Sidebar.tsx #1110
Conversation
fixed undefined name to id
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
We require all PRs to follow Conventional Commits specification.
|
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
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.
Please fix your PR title to follow the conventional commit specification.
https://github.com/asyncapi/asyncapi-react/blob/master/CONTRIBUTING.md
@@ -39,9 +39,10 @@ export const Sidebar: React.FunctionComponent = () => { | |||
<ul className="text-sm mt-2"> | |||
{messages.map((message, index) => ( | |||
<li key={`menu-message-list-${message.name() ?? index}`}> | |||
// fixed the href message.name() to message.id() to fix undifined name |
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.
Kindly get rid of this comment :)
fixed this issue #1109
Description
Changes proposed in this pull request:
The anchor link for a message in the sidebar does not work as expected when message.name() and message.id() differ.
Expected result
Clicking on a message in the sidebar should set the correct hash in the URL and scroll the message into view.
Actual result
The anchor link only works if message.name() and message.id() are identical.
If message.name() is not provided, the hash becomes #message-undefined.
before
after