fix flow usage for continousFetch

This commit is contained in:
Sean Yesmunt 2017-12-04 18:32:11 -05:00
parent d4b4b78e10
commit 6f4e35ac90

View file

@ -24,9 +24,10 @@ type Props = {
};
class ActiveShapeShift extends React.PureComponent<Props> {
continousFetch: ?number;
constructor() {
super();
// $FlowFixMe
this.continousFetch = undefined;
}
@ -34,7 +35,6 @@ class ActiveShapeShift extends React.PureComponent<Props> {
const { getActiveShift, shiftDepositAddress } = this.props;
getActiveShift(shiftDepositAddress);
// $FlowFixMe
this.continousFetch = setInterval(() => {
getActiveShift(shiftDepositAddress);
}, 10000);
@ -52,10 +52,10 @@ class ActiveShapeShift extends React.PureComponent<Props> {
}
clearContinuousFetch() {
/// $FlowFixMe
clearInterval(this.continousFetch);
// $FlowFixMe
this.continousFetch = null;
if (this.continousFetch) {
clearInterval(this.continousFetch);
this.continousFetch = null;
}
}
render() {