You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a couple of places where fields accept values that are typed
as `Json` per the JSII type specification. This conveys that literal
`null` values may be passed and need to be preserved (as far as JSII is
concerned - see aws/jsii#523). However in the CloudFormation domain,
`null` is semantically equivalent to `undefined`.
Now enters Javascript's confusing type system, where `null` is an
`object` that cannot be converted to `object` (you read this correctly):
```js
typeof null === 'object'
// => true
Object.entries(null);
// => Thrown:
// TypeError: Cannot convert undefined or null to object
// at Function.entries (<canonymous>)
```
So this changes the `undefined` checks to the `null`-coercing way, so
that `null` and `undefined` are handled the same way.
0 commit comments