Skip to content

Commit

Permalink
Use the correct debounce parameter (#13)
Browse files Browse the repository at this point in the history
Debouncing was practically broken, as the incorrect parameter was used.
  • Loading branch information
kvalev authored Oct 21, 2021
1 parent 63b42e2 commit 27fbdbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ MaplibreGeocoder.prototype = {
this._inputEl.addEventListener("blur", this._onBlur);
}

this._inputEl.addEventListener("keydown", debounce(this._onKeyDown, this.debounceSearch));
this._inputEl.addEventListener("keydown", debounce(this._onKeyDown, this.options.debounceSearch));
this._inputEl.addEventListener("paste", this._onPaste);
this._inputEl.addEventListener("change", this._onChange);
this.container.addEventListener("mouseenter", this._showButton);
Expand Down

0 comments on commit 27fbdbb

Please sign in to comment.