Skip to content

Commit 8542089

Browse files
Anton IvanovSTRML
authored andcommitted
fix(svg): Remove references to global.
* assume SVGElement can be defined in a global namespace. Fixes issues when draggable is run a second time through Babel. Fixes #162
1 parent 1cda7bf commit 8542089

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Draggable.es6

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

193193
componentDidMount() {
194194
// Check to see if the element passed is an instanceof SVGElement
195-
if(typeof global.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof global.SVGElement) {
195+
if(typeof SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof SVGElement) {
196196
this.setState({ isElementSVG: true });
197197
}
198198
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@
6969
"dependencies": {
7070
"classnames": "^2.2.5"
7171
}
72-
}
72+
}

0 commit comments

Comments
 (0)