From e9f7f19ca0bbfcf2fcfd2f6968325adbb4b963d2 Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Wed, 27 Jul 2022 13:25:59 +0200 Subject: [PATCH] [web] SL history: fix incorrect `var`->`let` replacement (#8994) GitOrigin-RevId: ea90be7d89f6c31156a30af3278218f93f1d5c6a --- .../js/ide/history/controllers/HistoryListController.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/ide/history/controllers/HistoryListController.js b/services/web/frontend/js/ide/history/controllers/HistoryListController.js index e2c0d631cd..87fcf5207a 100644 --- a/services/web/frontend/js/ide/history/controllers/HistoryListController.js +++ b/services/web/frontend/js/ide/history/controllers/HistoryListController.js @@ -62,7 +62,11 @@ App.controller('HistoryListController', function ($scope, $modal, ide) { return (() => { const result = [] for (const update of Array.from($scope.history.updates)) { - let inSelection + // replacing this declaration with `let` introduces a bug in history point selection: + // https://github.com/overleaf/overleaf/issues/1035 + // eslint-disable-next-line no-var + var inSelection + if (update.selectedTo) { inSelection = true beforeSelection = false