From 8b4b4857cc52ff98514f4a044240598a466dcf94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20Maanp=C3=A4=C3=A4?= Date: Fri, 29 May 2020 11:04:35 +0300 Subject: [PATCH] Cast checkValidity return value to boolean --- src/vaadin-time-picker.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vaadin-time-picker.html b/src/vaadin-time-picker.html index 600101a..acadbda 100644 --- a/src/vaadin-time-picker.html +++ b/src/vaadin-time-picker.html @@ -702,9 +702,9 @@ * @return {boolean} True if the value is valid */ checkValidity() { - return this.__inputElement.focusElement.checkValidity() && + return !!(this.__inputElement.focusElement.checkValidity() && (!this.value || this._timeAllowed(this.i18n.parseTime(this.value))) && - (!this.__dropdownElement.value || this.i18n.parseTime(this.__dropdownElement.value)); + (!this.__dropdownElement.value || this.i18n.parseTime(this.__dropdownElement.value))); } }