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],