From bd6d69d7a70451a9a587c9ee54b6025d1b27f4ce Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Wed, 12 Oct 2016 17:47:25 +0800 Subject: [PATCH] Fix to handle checkAllNotesRevision might return null notes --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index b877bc8..b8034ad 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); }