Skip to content

Commit

Permalink
BaseInput: Don't access the completer if there is none
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Apr 19, 2023
1 parent 1dba84d commit b8085a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion asset/js/widget/BaseInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,9 @@ define(["../notjQuery", "Completer"], function ($, Completer) {
this.deselectTerms();

let input = event.target;
if (! this.hasSyntaxError(input) && ! this.completer.isBeingCompleted(input, false)) {
if (! this.hasSyntaxError(input) && (
this.completer === null || ! this.completer.isBeingCompleted(input, false)
)) {
// Only request suggestions if the input is valid and not already being completed
let value = this.readPartialTerm(input);
this.complete(input, { trigger: 'script', term: { label: value } });
Expand Down

0 comments on commit b8085a9

Please sign in to comment.