fix(core): check for undefined on normalizeDebugBindingValue (#15503)

DebugServices is parsing false atributes values incorrectly.
Parse5 expects a string value for attributes, but currently boolean is being sent.

Closes #15494
This commit is contained in:
Diego Barahona
2017-03-28 14:33:07 -06:00
committed by Victor Berchet
parent 6269d28bb0
commit aa16ccda79
2 changed files with 28 additions and 2 deletions

View File

@ -275,7 +275,7 @@ function camelCaseToDashCase(input: string): string {
function normalizeDebugBindingValue(value: any): string {
try {
// Limit the size of the value as otherwise the DOM just gets polluted.
return value ? value.toString().slice(0, 30) : value;
return value != null ? value.toString().slice(0, 30) : value;
} catch (e) {
return '[ERROR] Exception while trying to serialize the value';
}