Skip to content

Commit 1d532b7

Browse files
committed
Don't assume global SVGElement exists. Fixes #123
1 parent ea972cd commit 1d532b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Draggable.es6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export default class Draggable extends React.Component {
174174

175175
componentDidMount() {
176176
// Check to see if the element passed is an instanceof SVGElement
177-
if(ReactDOM.findDOMNode(this) instanceof SVGElement) {
177+
if(typeof global.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof global.SVGElement) {
178178
this.setState({ isElementSVG: true });
179179
}
180180
}

0 commit comments

Comments
 (0)