Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fixes #5198 to avoid calling indexOf() on SVGAnimatedString instances #5199

Closed
wants to merge 1 commit into from

Conversation

jstrachan
Copy link

No description provided.

@mary-poppins
Copy link

Thanks for the PR!

  • Contributor signed CLA now or in the past
    • If you just signed, leave a comment here with your real name
  • PR's commit messages follow the commit message format

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

…exOf' when clicking on an SVG diagram with links

a minor patch to check a url is a string before attempting to call indexOf() on it to avoid barfing on SVGAnimatedString

fixes angular#5198
@jstrachan
Copy link
Author

James Strachan

@snostorm
Copy link

+1, just hit this myself

@petebacondarwin
Copy link
Member

@jstrachan - thanks for the PR. This fix will need a unit test that demonstrates the issue and you will need to sign the CLA before we can merge it.

@IgorMinar
Copy link
Contributor

closing in favor of #5472

thanks!

@IgorMinar IgorMinar closed this Dec 19, 2013
IgorMinar pushed a commit that referenced this pull request Dec 19, 2013
Before this fix, the xlink:href property of an SVG <a> element could not be parsed
on click, as the property is an SVGAnimatedString rather than a DOMString.

This patch parses the xlink:href's animVal into a DOMString in order to prevent
an `Object #<SVGAnimatedString> has no method 'indexOf'` exception from being thrown,
and also to update the location if necessary as expected.

Closes #5472
Closes #5198
Closes #5199
Closes #4098
Closes #1420
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request Jan 27, 2014
Before this fix, the xlink:href property of an SVG <a> element could not be parsed
on click, as the property is an SVGAnimatedString rather than a DOMString.

This patch parses the xlink:href's animVal into a DOMString in order to prevent
an `Object #<SVGAnimatedString> has no method 'indexOf'` exception from being thrown,
and also to update the location if necessary as expected.

Closes angular#5472
Closes angular#5198
Closes angular#5199
Closes angular#4098
Closes angular#1420
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request Jan 27, 2014
Before this fix, the xlink:href property of an SVG <a> element could not be parsed
on click, as the property is an SVGAnimatedString rather than a DOMString.

This patch parses the xlink:href's animVal into a DOMString in order to prevent
an `Object #<SVGAnimatedString> has no method 'indexOf'` exception from being thrown,
and also to update the location if necessary as expected.

Closes angular#5472
Closes angular#5198
Closes angular#5199
Closes angular#4098
Closes angular#1420
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants