Skip to content
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(Link): Fix error when href is not set #1373

Merged
merged 1 commit into from
Mar 26, 2020
Merged

Conversation

MarcusNotheis
Copy link
Collaborator

No description provided.

@ilhan007
Copy link
Member

Hello @MarcusNotheis the fix is fine, just wanted to ask you how did you get this?

The "href" is an empty string by default (at least in the latest development) and and empty string has 0 length, so "".length is 0, should not throw an error?

@MarcusNotheis
Copy link
Collaborator Author

We had the case in one of our applications. We rendered the Link and loaded the value for the href asynchronously. This resulted in a race condition that there was a possible state when the href would be undefined as this was crashing the link and all other web components as well.
We could also have defaulted our coding to use an empty string instead of undefined but I thought it wouldn't hurt if the Web Components Link would catch that error

@MarcusNotheis
Copy link
Collaborator Author

image
image

@ilhan007 ilhan007 merged commit a7cf983 into SAP:master Mar 26, 2020
@MarcusNotheis MarcusNotheis deleted the patch-1 branch March 26, 2020 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants