Skip to content

Commit

Permalink
flow: Ignore a Flow "error" that is not one
Browse files Browse the repository at this point in the history
Flow warns us that 'EventTarget is incompatible with Node'. But
that is wrong. In fact the definition in Flow's code is this:

```js
declare class Node extends EventTarget {
```

Ignore!
  • Loading branch information
borisyankov committed Sep 20, 2018
1 parent 48e8e14 commit 8c8d62d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/webview/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ const handleLongPress = (e: TouchEvent) => {
sendMessage({
type: 'longPress',
target: e.target.matches('.header') ? 'header' : 'message',
// $FlowFixMe EventTarget is incompatible with Node (no it is not!)
messageId: getMessageIdFromNode(e.target),
});
};
Expand Down

0 comments on commit 8c8d62d

Please sign in to comment.