Commit 23c40c8f authored by Matthew Taylor's avatar Matthew Taylor

if social messages less than 0, display 0

handles a caching edge case with admin messages.
parent 64930527
...@@ -225,6 +225,9 @@ var MessagesPresentation = injectIntl(React.createClass({ ...@@ -225,6 +225,9 @@ var MessagesPresentation = injectIntl(React.createClass({
adminMessageLength = adminMessageLength + 1; adminMessageLength = adminMessageLength + 1;
} }
var numNewSocialMessages = this.props.numNewMessages - adminMessageLength; var numNewSocialMessages = this.props.numNewMessages - adminMessageLength;
if (numNewSocialMessages < 0) {
numNewSocialMessages = 0;
}
return ( return (
<div className="messages"> <div className="messages">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment