Merge pull request #152 from Shopify/fix-null
fix: where react props can be null, yet still technically an "object"
This commit is contained in:
commit
72c9c5dee5
|
@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
<!-- ## Unreleased -->
|
||||
- fix: reading property of null for component props
|
||||
|
||||
## 0.6.1 - 2021-11-08
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ export function renderReactProps(props: any) {
|
|||
function renderReactProp(prop: any): any {
|
||||
if (
|
||||
typeof prop === 'object' &&
|
||||
prop !== null &&
|
||||
prop['$$typeof'] === Symbol.for('react.element')
|
||||
) {
|
||||
if (prop.type instanceof Function) {
|
||||
|
|
Loading…
Reference in a new issue