fix(ivy): reset style property value defined using [style.prop.px] (#33780)

Prior to this change, setting style prop value to undefined or empty string would not result in resetting prop value in case the style prop is defined using [style.prop.px] syntax. The problem is that the check for empty value (and thus reseting the value) considered successful only in case of `null` value. This commit updates the check to use `isStylingValueDefined` function that also checks for undefined and empty string.

PR Close #33780
This commit is contained in:
Andrew Kushnir
2019-11-12 16:00:24 -08:00
committed by Kara Erickson
parent f1b32840d0
commit 0fecea1427
2 changed files with 29 additions and 1 deletions

View File

@ -585,7 +585,7 @@ function resolveStylePropValue(
if (value === NO_CHANGE) return value;
let resolvedValue: string|null = null;
if (value !== null) {
if (isStylingValueDefined(value)) {
if (suffix) {
// when a suffix is applied then it will bypass
// sanitization entirely (b/c a new string is created)