From f23deb4d9a7440186487bc351406176157ac6ffc Mon Sep 17 00:00:00 2001 From: Jody Clements Date: Thu, 23 Jul 2015 11:09:06 -0400 Subject: [PATCH] Another instance of null repo killing the console. This time it was in the admin stats component. --- js/components/ServerStats.react.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/components/ServerStats.react.js b/js/components/ServerStats.react.js index c6b645a..f8c3b8a 100644 --- a/js/components/ServerStats.react.js +++ b/js/components/ServerStats.react.js @@ -14,7 +14,9 @@ class StatsDisplay extends React.Component { for (var key in this.props.repos) { if (this.props.repos.hasOwnProperty(key)) { var repo = this.props.repos[key]; - versionNodes += Object.keys(repo.DAG.Nodes).length; + if (repo) { + versionNodes += Object.keys(repo.DAG.Nodes).length; + } } }