Closed Kanaye closed 6 years ago
When updating a states property from a primitiv value (e.g. null) null to an object. The following line tries to access an property on the primitiv value and therefore throws an error. https://github.com/developit/stockroom/blob/0c99699ed38c3cf993e4f08d489da9fa774e5e52/src/util.js#L52 Here an example.
null
I probably also PR for this one later.
Edit: It's only null because typeof null === 'object'.
typeof null === 'object'
When updating a states property from
a primitiv value (e.g.null to an object. The following line tries to access an property on the primitiv value and therefore throws an error. https://github.com/developit/stockroom/blob/0c99699ed38c3cf993e4f08d489da9fa774e5e52/src/util.js#L52 Here an example.null
)I probably also PR for this one later.
Edit: It's only null because
typeof null === 'object'
.