Skip to content

Commit

Permalink
Merge pull request #926 from methyl/patch-1
Browse files Browse the repository at this point in the history
Handle null elements in getData
  • Loading branch information
ndelangen authored Apr 28, 2017
2 parents 25d8a2e + 25971c4 commit 691b55e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/addon-info/src/components/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ function getData(element) {
text: null,
children: null,
};

if (typeof element === 'null') {
return data
}

if (typeof element == 'string') {
data.text = element;
Expand Down

0 comments on commit 691b55e

Please sign in to comment.