From b8085a956f32f2046489015296b417213d17fe23 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 17 Apr 2023 16:35:01 +0200 Subject: [PATCH] BaseInput: Don't access the completer if there is none --- asset/js/widget/BaseInput.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/asset/js/widget/BaseInput.js b/asset/js/widget/BaseInput.js index 348ca5eb..82d42e28 100644 --- a/asset/js/widget/BaseInput.js +++ b/asset/js/widget/BaseInput.js @@ -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 } });