nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit 1950ee4247daebc5a1842f6a35d6cdbdf3dee655
parent 99e703a91a0c6d0bdd9347c2a440ecb5023bf9fc
Author: Sergej Orlov <wladimirych@gmail.com>
Date:   Sun,  5 Jan 2020 21:54:39 +0100

fix lint errors (yoda)

Diffstat:
Msrc/lib/leaflet.control.layers.hotkeys/index.js | 2+-
Msrc/lib/leaflet.control.track-list/track-list.js | 2+-
Msrc/lib/leaflet.polyline-edit/index.js | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/leaflet.control.layers.hotkeys/index.js b/src/lib/leaflet.control.layers.hotkeys/index.js @@ -75,7 +75,7 @@ function enableHotKeys(control) { const pressedKey = this._keyDown; this._keyDown = null; const targetTag = e.target.tagName.toLowerCase(); - if (('input' === targetTag && e.target.type === 'text') || 'textarea' === targetTag || + if ((targetTag === 'input' && e.target.type === 'text') || targetTag === 'textarea' || pressedKey !== e.keyCode) { return; } diff --git a/src/lib/leaflet.control.track-list/track-list.js b/src/lib/leaflet.control.track-list/track-list.js @@ -866,7 +866,7 @@ L.Control.TrackList = L.Control.extend({ }, onEscPressedStopLineJoinSelection: function(e) { - if ('input' === e.target.tagName.toLowerCase()) { + if (e.target.tagName.toLowerCase() === 'input') { return; } switch (e.keyCode) { diff --git a/src/lib/leaflet.polyline-edit/index.js b/src/lib/leaflet.polyline-edit/index.js @@ -158,7 +158,7 @@ L.Polyline.EditMixin = { }, onKeyPress: function(e) { - if ('input' === e.target.tagName.toLowerCase()) { + if (e.target.tagName.toLowerCase() === 'input') { return; } var code = e.keyCode;