From 12eb1dec61d580e071f1a228196a19fbae276f9b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 4 Feb 2020 18:58:59 +0100 Subject: [PATCH] Fix TS type errors on widget number --- api/js/etemplate/et2_widget_number.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_number.ts b/api/js/etemplate/et2_widget_number.ts index fc67dcbbde..330762c97a 100644 --- a/api/js/etemplate/et2_widget_number.ts +++ b/api/js/etemplate/et2_widget_number.ts @@ -83,9 +83,9 @@ class et2_number extends et2_textbox { let ok = true; // if we have a html5 validation error, show it, as this.input.val() will be empty! - if (this.input && this.input[0] && this.input[0].validationMessage && !this.input[0].validity.stepMismatch) + if (this.input && this.input[0] && (this.input[0]).validationMessage && !(this.input[0]).validity.stepMismatch) { - _messages.push(this.input[0].validationMessage); + _messages.push((this.input[0]).validationMessage); ok = false; } return super.isValid(_messages) && ok;