fix(common): ngStyle should ignore undefined values (#34422)
Prior to ivy, undefined values passed in an object to the ngStyle directive were ignored. Restore this behavior by ignoring keys that point to undefined values. closes #34310 PR Close #34422
This commit is contained in:

committed by
Kara Erickson

parent
23cf11a788
commit
1144ce97f9
@ -214,7 +214,10 @@ function bulidMapFromValues(
|
||||
let key = keys[i];
|
||||
key = trim ? key.trim() : key;
|
||||
const value = (values as{[key: string]: any})[key];
|
||||
setMapValues(map, key, value, parseOutUnits, allowSubKeys);
|
||||
|
||||
if (value !== undefined) {
|
||||
setMapValues(map, key, value, parseOutUnits, allowSubKeys);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// case 2: array
|
||||
|
Reference in New Issue
Block a user