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

Prevent empty href attribute on web component version of bolt-link #1788

Merged
merged 3 commits into from
Mar 24, 2020

Conversation

adamszalapski
Copy link
Collaborator

@adamszalapski adamszalapski commented Mar 23, 2020

Jira

http://vjira2:8080/browse/BDS-1921

Summary

Fix the issue and write a test to check this.

How to test

Run this code locally. Add bolt-link web component version without url prop or provide content without href attribute like:
<bolt-link>Link without URL prop</bolt-link> or <bolt-link><a target="_blank">Link without href</a></bolt-link> and check if you clikc on that link page will reload.
You can inspect if href is added to the content inside bolt-link

This is a small fix and i think that only one approve is enough to merge it.

Copy link
Contributor

@sghoweri sghoweri left a comment

Choose a reason for hiding this comment

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

Thanks @adamszalapski! +1 on the new tests added 💯

This work also (indirectly) relates to work I'm doing with re-rendering Link / Button, etc when props like url change, however this should be safe to merge down as is. 👍

@sghoweri sghoweri merged commit 03d9614 into master Mar 24, 2020
@sghoweri sghoweri added the bug label Mar 24, 2020
@sghoweri sghoweri added this to the v2.21.0 milestone Mar 24, 2020
@sghoweri
Copy link
Contributor

sghoweri commented Apr 8, 2020

PR was released with v2.21.0

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

2 participants