From 407b14778d850e458bb0d02d39add758aa60bddc Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 18 Sep 2018 15:56:17 -0400 Subject: [PATCH] fix(datetime): check for null instead of undefined fixes #15605 --- core/src/components/datetime/datetime.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 990e252ca2..523f0a7214 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -503,7 +503,7 @@ export class Datetime implements ComponentInterface { hostData() { const addPlaceholderClass = - (this.text === undefined && this.placeholder != null) ? true : false; + (this.text == null && this.placeholder != null) ? true : false; return { class: { @@ -519,8 +519,8 @@ export class Datetime implements ComponentInterface { // If selected text has been passed in, use that first // otherwise use the placeholder let datetimeText = this.text; - if (datetimeText === undefined) { - datetimeText = this.placeholder ? this.placeholder : ''; + if (datetimeText == null) { + datetimeText = this.placeholder != null ? this.placeholder : ''; } return [