diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/components/Connect.js | 4 | ||||
| -rw-r--r-- | app/lib/keyframe-animation.js | 4 | ||||
| -rw-r--r-- | app/routes.js | 10 |
3 files changed, 8 insertions, 10 deletions
diff --git a/app/components/Connect.js b/app/components/Connect.js index f4647678f1..fbb743854d 100644 --- a/app/components/Connect.js +++ b/app/components/Connect.js @@ -294,7 +294,9 @@ export default class Connect extends Component<ConnectProps, ConnectState> { } onIPAddressClick() { - this._copyTimer && clearTimeout(this._copyTimer); + if (this._copyTimer) { + clearTimeout(this._copyTimer); + } this._copyTimer = setTimeout(() => this.setState({ showCopyIPMessage: false }), 3000); this.setState({ showCopyIPMessage: true }); this.props.onCopyIP(); diff --git a/app/lib/keyframe-animation.js b/app/lib/keyframe-animation.js index 1b52f859c6..7a8968eb35 100644 --- a/app/lib/keyframe-animation.js +++ b/app/lib/keyframe-animation.js @@ -36,7 +36,7 @@ export default class KeyframeAnimation { this._onFrame = newValue; } get onFrame(): ?OnFrameFn { - this._onFrame; + return this._onFrame; } // called when animation finished for non-repeating animations. @@ -44,7 +44,7 @@ export default class KeyframeAnimation { this._onFinish = newValue; } get onFinish(): ?OnFinishFn { - this._onFinish; + return this._onFinish; } // pace per frame in ms diff --git a/app/routes.js b/app/routes.js index 03f3401035..c48e03dac3 100644 --- a/app/routes.js +++ b/app/routes.js @@ -21,10 +21,6 @@ export type SharedRouteProps = { backend: Backend, }; -type CustomRouteProps = { - component: React.ComponentType<*>, -}; - export default function makeRoutes( getState: ReduxGetState, componentProps: SharedRouteProps, @@ -40,7 +36,7 @@ export default function makeRoutes( // Renders public route // example: <PublicRoute path="/" component={ MyComponent } /> - const PublicRoute = ({ component, ...otherProps }: CustomRouteProps) => { + const PublicRoute = ({ component, ...otherProps }) => { return ( // $FlowFixMe: This has been fixed in Flow 0.71 <Route @@ -54,7 +50,7 @@ export default function makeRoutes( // Renders protected route that requires authentication, otherwise redirects to / // example: <PrivateRoute path="/protected" component={ MyComponent } /> - const PrivateRoute = ({ component, ...otherProps }: CustomRouteProps) => { + const PrivateRoute = ({ component, ...otherProps }) => { return ( // $FlowFixMe: This has been fixed in Flow 0.71 <Route @@ -76,7 +72,7 @@ export default function makeRoutes( // Renders login route that is only available to non-authenticated // users. Otherwise this route redirects user to /connect. // example: <LoginRoute path="/login" component={ MyComponent } /> - const LoginRoute = ({ component, ...otherProps }: CustomRouteProps) => { + const LoginRoute = ({ component, ...otherProps }) => { return ( // $FlowFixMe: This has been fixed in Flow 0.71 <Route |
