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 #6335 by specifically checking for correspondingElement #6366

Merged
merged 3 commits into from
Oct 31, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix #6335 by specifically checking for correspondingElement
  • Loading branch information
Schleuse committed Oct 11, 2018
commit 479295e7b2f0bf3244c2335386efce0c1f1a1aaa
4 changes: 4 additions & 0 deletions src/dom/DomUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export function setClass(el, name) {
// @function getClass(el: HTMLElement): String
// Returns the element's class.
export function getClass(el) {
// Check if the element is an SVGElementInstance and use the correspondingElement instead
if (el.correspondingElement) {
el = el.correspondingElement;
}
return el.className.baseVal === undefined ? el.className : el.className.baseVal;
}

Expand Down