Skip to content

Commit

Permalink
fix: flow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Dec 12, 2018
1 parent 08f567a commit 8c21e32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"eslint-plugin-flowtype": "^2.30.0",
"eslint-plugin-react": "^7.0.0",
"eslint-watch": "^3.0.0",
"flow-bin": "^0.78.0",
"flow-bin": "^0.87.0",
"flow-copy-source": "^1.2.1",
"flow-watch": "^1.1.0",
"husky": "^0.14.3",
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ export default class PopupState extends React.Component<Props, State> {
else this.handleClose()
}

render(): ?React.Node {
render(): React.Node | null {
const { children, popupId, variant } = this.props
const { anchorEl } = this.state

const isOpen = Boolean(anchorEl)

return children({
const result = children({
open: this.handleOpen,
close: this.handleClose,
toggle: this.handleToggle,
Expand All @@ -213,5 +213,7 @@ export default class PopupState extends React.Component<Props, State> {
popupId,
variant,
})
if (result == null) return null
return result
}
}
7 changes: 4 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2913,9 +2913,10 @@ flat-cache@^1.2.1:
graceful-fs "^4.1.2"
write "^0.2.1"

flow-bin@^0.78.0:
version "0.78.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.78.0.tgz#df9fe7f9c9a2dfaff39083949fe2d831b41627b7"
flow-bin@^0.87.0:
version "0.87.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.87.0.tgz#fab7f984d8cc767e93fa9eb01cf7d57ed744f19d"
integrity sha512-mnvBXXZkUp4y6A96bR5BHa3q1ioIIN2L10w5osxJqagAakTXFYZwjl0t9cT3y2aCEf1wnK6n91xgYypQS/Dqbw==

flow-copy-source@^1.2.1:
version "1.2.1"
Expand Down

0 comments on commit 8c21e32

Please sign in to comment.