Update to add revision saving policy

This commit is contained in:
Wu Cheng-Han
2016-09-18 16:50:20 +08:00
parent f2347782d8
commit 79fd2d1364
3 changed files with 26 additions and 6 deletions

2
app.js
View File

@@ -526,7 +526,7 @@ models.sequelize.sync().then(function () {
if (realtime.isReady()) {
models.Revision.checkAllNotesRevision(function (err, notes) {
if (err) return new Error(err);
if (notes.length <= 0) return startListen();
if (!notes || notes.length <= 0) return startListen();
});
}
});