Skip to content

Commit 4bba799

Browse files
committed
Flow: Force-cast to MouseEvent. See facebook/flow#1898 (comment)
1 parent 491aa71 commit 4bba799

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/DraggableCore.es6

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,10 @@ export default class DraggableCore extends React.Component {
263263
this.handleDragStop(new MouseEvent('mouseup'));
264264
} catch (err) {
265265
// Old browsers
266-
const event = document.createEvent('MouseEvents');
266+
const event = ((document.createEvent('MouseEvents'): any): MouseEvent);
267267
// I see why this insanity was deprecated
268268
// $FlowIgnore
269269
event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
270-
// $FlowIgnore
271270
this.handleDragStop(event);
272271
}
273272
return;

0 commit comments

Comments
 (0)