fix(datetime): allow values to be zero (#14480)

* fix(datetime): allow values to be zero

* Using null check
This commit is contained in:
pwespi
2018-08-24 04:27:45 +02:00
committed by Manu MA
parent 151c58e12f
commit e0b8e2472d

View File

@ -11,7 +11,7 @@ export function renderDatetime(template: string, value: DatetimeData, locale: Lo
const token = '{' + index + '}';
const text = renderTextFormat(format.f, (value as any)[format.k], value, locale);
if (!hasText && text && (value as any)[format.k]) {
if (!hasText && text && (value as any)[format.k] != null) {
hasText = true;
}