mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 10:58:23 -05:00
Merge pull request #1524 from mewtaylor/hotfix/fix-interval
[Master] fix parentheses around interval
This commit is contained in:
commit
e2eb7eb788
1 changed files with 6 additions and 6 deletions
|
@ -43,9 +43,9 @@ var Navigation = React.createClass({
|
||||||
},
|
},
|
||||||
componentDidMount: function () {
|
componentDidMount: function () {
|
||||||
if (this.props.session.session.user) {
|
if (this.props.session.session.user) {
|
||||||
var intervalId = setInterval(
|
var intervalId = setInterval(function () {
|
||||||
this.props.dispatch(messageCountActions.getCount(this.props.session.session.user.username), 120000)
|
this.props.dispatch(messageCountActions.getCount(this.props.session.session.user.username));
|
||||||
); // check for new messages every 2 mins.
|
}.bind(this), 120000); // check for new messages every 2 mins.
|
||||||
this.setState({'messageCountIntervalId': intervalId});
|
this.setState({'messageCountIntervalId': intervalId});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -56,9 +56,9 @@ var Navigation = React.createClass({
|
||||||
'accountNavOpen': false
|
'accountNavOpen': false
|
||||||
});
|
});
|
||||||
if (this.props.session.session.user) {
|
if (this.props.session.session.user) {
|
||||||
var intervalId = setInterval(
|
var intervalId = setInterval(function () {
|
||||||
this.props.dispatch(messageCountActions.getCount(this.props.session.session.user.username), 120000)
|
this.props.dispatch(messageCountActions.getCount(this.props.session.session.user.username));
|
||||||
); // check for new messages every 2 mins.
|
}.bind(this), 120000); // check for new messages every 2 mins.
|
||||||
this.setState({'messageCountIntervalId': intervalId});
|
this.setState({'messageCountIntervalId': intervalId});
|
||||||
} else {
|
} else {
|
||||||
// clear message count check, and set to default id.
|
// clear message count check, and set to default id.
|
||||||
|
|
Loading…
Reference in a new issue