From 5ea91273918423d844475a52d16924f5eafb2869 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Sun, 22 Dec 2019 18:20:30 +0100 Subject: [PATCH] Use const in secondary_toolbar.js --- web/secondary_toolbar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/secondary_toolbar.js b/web/secondary_toolbar.js index b5252151ddbd4..7eec2883cf26d 100644 --- a/web/secondary_toolbar.js +++ b/web/secondary_toolbar.js @@ -12,6 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* eslint no-var: error, prefer-const: error */ import { SCROLLBAR_PADDING, ScrollMode, SpreadMode } from './ui_utils'; import { CursorTool } from './pdf_cursor_tools'; @@ -172,8 +173,8 @@ class SecondaryToolbar { for (const { element, eventName, close, eventDetails, } of this.buttons) { element.addEventListener('click', (evt) => { if (eventName !== null) { - let details = { source: this, }; - for (let property in eventDetails) { + const details = { source: this, }; + for (const property in eventDetails) { details[property] = eventDetails[property]; } this.eventBus.dispatch(eventName, details);