diff --git a/assets/js/dashboard/stats/current-visitors.js b/assets/js/dashboard/stats/current-visitors.js index c058a28f3..5543398a7 100644 --- a/assets/js/dashboard/stats/current-visitors.js +++ b/assets/js/dashboard/stats/current-visitors.js @@ -22,13 +22,14 @@ export default class CurrentVisitors extends React.Component { } render() { - if (this.state.currentVisitors !== null) { + const { currentVisitors } = this.state; + if (currentVisitors !== null) { return ( - {this.state.currentVisitors} current visitors + {currentVisitors} current visitor{currentVisitors === 1 ? '' : 's'} ) } else {