From 8d79b37651c9e590fc7b4654751d782b91a1082d Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Fri, 24 Jun 2016 15:04:10 +0100 Subject: [PATCH] return from _doIndexOperation if referneces is not setup eailer --- .../app/coffee/Features/References/ReferencesHandler.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/app/coffee/Features/References/ReferencesHandler.coffee b/services/web/app/coffee/Features/References/ReferencesHandler.coffee index 72b2216e69..fa38ddedf6 100644 --- a/services/web/app/coffee/Features/References/ReferencesHandler.coffee +++ b/services/web/app/coffee/Features/References/ReferencesHandler.coffee @@ -66,6 +66,8 @@ module.exports = ReferencesHandler = ReferencesHandler._doIndexOperation(projectId, project, docIds, [], callback) _doIndexOperation: (projectId, project, docIds, fileIds, callback) -> + if !settings.apis?.references?.url? + return callback() ReferencesHandler._isFullIndex project, (err, isFullIndex) -> if err logger.err {err, projectId}, "error checking whether to do full index" @@ -84,8 +86,6 @@ module.exports = ReferencesHandler = ReferencesHandler._buildFileUrl projectId, fileId allUrls = bibDocUrls.concat(bibFileUrls) logger.log {projectId, isFullIndex, docIds, bibDocUrls}, "sending request to references service" - if !settings.apis.references.url? - return callback() request.post { url: "#{settings.apis.references.url}/project/#{projectId}/index" json: