angular/packages/core/test/animation
Kristiyan Kostadinov 2a75754ee8 fix(animations): apply default params when resolved value is null or undefined (#45339)
The animations package supports adding default parameter values to an animation that will be used as a fallback if some parameters aren't defined. The problem is that they're applied using a spread expression which means that any own property of the animation parameters will override the defaults, even if it resolves to null or undefined. This can lead to obscure errors like "Cannot read property toString of undefined" for an animation that looks like `{params: {foo: undefined}}` with defaults `{foo: 123}`.

I ran into this issue while debugging some test failures on Material.

These changes address the issue by:
1. Applying the defaults if the resolved value is null or undefined.
2. Updating the validation function to use a null check instead of `hasOwnProperty`.

PR Close #45339
2022-03-17 14:02:37 -07:00
..
animation_integration_spec.ts fix(animations): apply default params when resolved value is null or undefined (#45339) 2022-03-17 14:02:37 -07:00
animation_query_integration_spec.ts perf(animations): Remove generic objects in favor of Maps (#44482) 2022-01-31 20:28:43 +00:00
animation_router_integration_spec.ts perf(animations): Remove generic objects in favor of Maps (#44482) 2022-01-31 20:28:43 +00:00
animations_with_web_animations_integration_spec.ts perf(animations): remove no longer needed CssKeyframes classes (#44903) 2022-01-31 21:36:35 +00:00