Silence eslint warning: error 'map' is not defined

Not sure why it has worked anyway (says kendy), but presumably using
this._map instead, like at the beginning of the function, works
identically. Yay for static syntax analysis of a very dynamic
language.
This commit is contained in:
Tor Lillqvist 2018-10-10 13:49:23 +03:00
parent 4cce0e8d0a
commit e9293f6954

View file

@ -167,13 +167,13 @@ L.Control.MobileInput = L.Control.extend({
if (e.inputType === 'insertText') {
if (this._textData) {
for (var i = 0; i < this._textData.length; ++i) {
map._docLayer._postKeyboardEvent('input', this._textData[i].charCodeAt(), 0);
this._map._docLayer._postKeyboardEvent('input', this._textData[i].charCodeAt(), 0);
}
}
}
else if (e.inputType === 'insertCompositionText') {
if (this._composingData) {
map._docLayer._postCompositionEvent(0, 'input', this._composingData);
this._map._docLayer._postCompositionEvent(0, 'input', this._composingData);
}
}
else if (e.inputType === 'deleteContentBackward' && this._lastInput !== backSpace) {