From c9f5cd49b0946b116a86fdd9cb4938a03fc96e1a Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Mon, 10 Oct 2016 20:42:40 +0800 Subject: Fix potential error --- public/js/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'public/js') diff --git a/public/js/index.js b/public/js/index.js index 57658d69..323da283 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2335,7 +2335,7 @@ var addStyleRule = (function () { }()); function updateAuthorshipInner() { // ignore when ot not synced yet - if (Object.keys(cmClient.state).length > 0) return; + if (cmClient && Object.keys(cmClient.state).length > 0) return; authorMarks = {}; for (var i = 0; i < authorship.length; i++) { var atom = authorship[i]; -- cgit v1.2.3