From 7561e05660d5c6ec509211e3862ed6e0f405e994 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Fri, 27 Sep 2019 10:39:56 +0100 Subject: [PATCH] check timestamps array length --- services/document-updater/app/coffee/DeleteQueueManager.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/document-updater/app/coffee/DeleteQueueManager.coffee b/services/document-updater/app/coffee/DeleteQueueManager.coffee index e9f2346909..f1af0ba244 100644 --- a/services/document-updater/app/coffee/DeleteQueueManager.coffee +++ b/services/document-updater/app/coffee/DeleteQueueManager.coffee @@ -28,7 +28,7 @@ module.exports = DeleteQueueManager = flushProjectIfNotModified = (project_id, flushTimestamp, cb) -> ProjectManager.getProjectDocsTimestamps project_id, (err, timestamps) -> return callback(err) if err? - if !timestamps? + if timestamps.length == 0 logger.log {project_id}, "skipping flush of queued project - no timestamps" return cb() # are any of the timestamps newer than the time the project was flushed?