Skip to content

Commit

Permalink
Merge pull request lindell#346 from RobertBorg/fix_rendering_to_svg
Browse files Browse the repository at this point in the history
fix: handle uppercase nodeName
  • Loading branch information
lindell authored Oct 1, 2020
2 parents 31373e0 + 0ab464d commit 967b778
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/help/getRenderProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function getRenderProperties(element) {
return newCanvasRenderProperties(element);
}
// If SVG
else if (element && element.nodeName === 'svg' || typeof SVGElement !== 'undefined' && element instanceof SVGElement) {
else if (element && element.nodeName && element.nodeName.toLowerCase() === 'svg' || typeof SVGElement !== 'undefined' && element instanceof SVGElement) {
return {
element: element,
options: (0, _getOptionsFromElement2.default)(element),
Expand Down
2 changes: 1 addition & 1 deletion src/help/getRenderProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function getRenderProperties(element){
}
// If SVG
else if(
(element && element.nodeName === 'svg') ||
(element && element.nodeName && element.nodeName.toLowerCase() === 'svg') ||
(typeof SVGElement !== 'undefined' && element instanceof SVGElement)
){
return {
Expand Down

0 comments on commit 967b778

Please sign in to comment.