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:
Bret Little 2021-11-08 10:54:41 -05:00 committed by GitHub
commit 72c9c5dee5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -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

View file

@ -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) {