remove null/undefined to empty string

This commit is contained in:
Daniel Freedman
2017-12-04 16:29:07 -08:00
parent d5070bbee3
commit 75d873a00e
+1 -3
View File
@@ -17,9 +17,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @return {string} HTML stringified form of `obj`
*/
function htmlValue(value) {
if (value === null || value === undefined) {
return '';
} else if (value instanceof HTMLTemplateElement) {
if (value instanceof HTMLTemplateElement) {
return /** @type {!HTMLTemplateElement} */(value).innerHTML;
} else {
return String(value);