From 0df3ceb439f0147764cade77b0ff7498d502a305 Mon Sep 17 00:00:00 2001 From: rr- Date: Thu, 29 Sep 2016 11:16:18 +0200 Subject: [PATCH] client/build: work around uglifyjs bug #1308 https://github.com/mishoo/UglifyJS2/issues/1308 --- client/js/controls/post_notes_overlay_control.js | 5 +++-- client/js/controls/tag_input_control.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/js/controls/post_notes_overlay_control.js b/client/js/controls/post_notes_overlay_control.js index 26381ff..14b00cc 100644 --- a/client/js/controls/post_notes_overlay_control.js +++ b/client/js/controls/post_notes_overlay_control.js @@ -199,10 +199,11 @@ class SelectedState extends ActiveState { e.stopPropagation(); e.stopImmediatePropagation(); e.preventDefault(); + const args = offsetMap[e.which]; if (e.shiftKey) { - this._scaleEditedNote(...offsetMap[e.which]); + this._scaleEditedNote(...args); } else { - this._moveEditedNote(...offsetMap[e.which]); + this._moveEditedNote(...args); } } } diff --git a/client/js/controls/tag_input_control.js b/client/js/controls/tag_input_control.js index a579f15..2912b0f 100644 --- a/client/js/controls/tag_input_control.js +++ b/client/js/controls/tag_input_control.js @@ -366,8 +366,8 @@ class TagInputControl extends events.EventTarget { }, response => { return Promise.resolve([]); }).then(siblings => { - let maxSiblingOccurrences = Math.max( - 1, ...siblings.map(s => s.occurrences)); + const args = siblings.map(s => s.occurrences); + let maxSiblingOccurrences = Math.max(1, ...args); for (let sibling of siblings) { this._suggestions.set( sibling.tag.names[0],