From 473e9d32f2f85068fa0743fd201ce693deb757da Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Thu, 3 Sep 2020 10:42:26 +0200 Subject: [PATCH] Merge pull request #3154 from overleaf/jpa-bib-log-parser-use-es5 [misc] use es5 syntax in bib-log-parser -- babel does not process it GitOrigin-RevId: 82585111941b03b799de2fd209759078e0c6e7f6 --- .../web/frontend/js/vendor/libs/bib-log-parser.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/services/web/frontend/js/vendor/libs/bib-log-parser.js b/services/web/frontend/js/vendor/libs/bib-log-parser.js index 04afbf0d97..d0ae35b9d5 100644 --- a/services/web/frontend/js/vendor/libs/bib-log-parser.js +++ b/services/web/frontend/js/vendor/libs/bib-log-parser.js @@ -27,12 +27,17 @@ define(function() { // Too many log entries can cause browser crashes // Construct a too many files error from the last match - const maxErrors = 100 + var maxErrors = 100; if (iterationCount >= maxErrors) { - const level = newEntry.level + "s" - newEntry.message = `Over ${maxErrors} ${level} returned. Download raw logs to see full list`; + var level = newEntry.level + "s"; + newEntry.message = [ + "Over", + maxErrors, + level, + "returned. Download raw logs to see full list" + ].join(" "); newEntry.line = undefined; - result.unshift(newEntry) + result.unshift(newEntry); return [result, ""]; }