fix(ivy): elements properties should not be stringified (#22683)

PR Close #22683
This commit is contained in:
Marc Laval
2018-03-09 18:32:32 +01:00
committed by Kara Erickson
parent cd58c0a6d9
commit f95730b8e2
3 changed files with 16 additions and 3 deletions

View File

@ -755,7 +755,9 @@ export function elementProperty<T>(
setInputsForProperty(dataValue, value);
markDirtyIfOnPush(node);
} else {
value = (sanitizer != null ? sanitizer(value) : stringify(value)) as any;
// It is assumed that the sanitizer is only added when the compiler determines that the property
// is risky, so sanitization can be done without further checks.
value = sanitizer != null ? (sanitizer(value) as any) : value;
const native = node.native;
isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :
(native.setProperty ? native.setProperty(propName, value) :