Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

fix anchor fail when text length is exactly 4 #284

Closed

Conversation

ipip2005
Copy link
Collaborator

as well as test cases

@msftclas
Copy link

Hi @ipip2005, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.

TTYL, MSBOT;

@@ -58,7 +58,8 @@ class ReactA11yAnchorsRuleWalker extends ErrorTolerantWalker {
while (this.anchorInfoList.length > 0) {
const current: AnchorInfo = this.anchorInfoList.shift();
this.anchorInfoList.forEach((anchorInfo: AnchorInfo): void => {
if (current.href === anchorInfo.href &&
if (current.href &&
Copy link
Collaborator Author

@ipip2005 ipip2005 Sep 28, 2016

Choose a reason for hiding this comment

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

Just want to mention that, IMO, if href is not defined, the same href has same text should not be applied

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants