-
Notifications
You must be signed in to change notification settings - Fork 392
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
Broken SVG Links #279
Broken SVG Links #279
Conversation
Svg anchor tags return an object( {baseVal:string, animVal:string} ) instead of an string. This causes react-snap to throw an error
Hi. Thank you for contribution. Can you please add test-case for this? |
Does this test cover enough for you? |
Any feedback on this? |
Oh yes, sorry. I was distracted. Everything looks fine, I just want to run some tests, to make sure I understand what is happening. |
Thanks no problem! |
Array.from(document.querySelectorAll("a")).map(anchor => anchor.href) | ||
Array.from(document.querySelectorAll("a")).map(anchor => { | ||
if(anchor.href.baseVal){ | ||
return location.origin + anchor.href.baseVal; |
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.
return location.origin + anchor.href.baseVal; | |
const a = document.createElement("a"); | |
a.href = anchor.href.baseVal; | |
return a.href; |
There is small thing to change, but I can do it. Thanks |
Svg anchor tags return an object( {baseVal:string, animVal:string} ) instead of an string.
This causes react-snap to throw an error