Fix stupid date logic

This commit is contained in:
Drew DeVault 2018-02-26 13:43:08 -05:00
parent d15c787469
commit 96cf74af80

View File

@ -3,11 +3,11 @@ import formatDate from '../date';
export default class DateDisplay extends Component { export default class DateDisplay extends Component {
componentDidMount() { componentDidMount() {
setInterval(() => this.forceUpdate(), this.interval); this._interval = setInterval(() => this.forceUpdate(), this.interval);
} }
componentWillUnmount() { componentWillUnmount() {
clearInterval(this.interval); clearInterval(this._interval);
} }
render() { render() {