summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-12 17:47:25 +0800
committerWu Cheng-Han2016-10-12 17:47:25 +0800
commitbd6d69d7a70451a9a587c9ee54b6025d1b27f4ce (patch)
treee8eac34085b053f4bfee2dccfc6400a377c3d839
parent07673f07262a3e742b06d886b23a2969a6abe58a (diff)
Fix to handle checkAllNotesRevision might return null notes
Diffstat (limited to '')
-rw-r--r--app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app.js b/app.js
index b877bc8f..b8034add 100644
--- a/app.js
+++ b/app.js
@@ -512,7 +512,7 @@ process.on('SIGINT', function () {
if (history.isReady() && realtime.isReady()) {
models.Revision.checkAllNotesRevision(function (err, notes) {
if (err) throw new Error(err);
- if (notes.length <= 0) {
+ if (!notes || notes.length <= 0) {
clearInterval(checkCleanTimer);
return process.exit(0);
}