Skip to content

Commit

Permalink
fix: resolve null props as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Oct 17, 2018
1 parent 214c256 commit 5186b07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ class ReactFromJSON<
};

resolveProp = (prop: any): any => {
if (Array.isArray(prop)) {
if (prop === null) {
return prop;
} else if (Array.isArray(prop)) {
return prop.map(this.resolveProp);
} else if (typeof prop === "object") {
if (
Expand Down

0 comments on commit 5186b07

Please sign in to comment.