babel-plugin-add-react-displayname
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -145,3 +145,3 @@ module.exports = transform; | ||
if (lastBlock.type === 'ReturnStatement') { | ||
return lastBlock.argument.type === 'JSXElement' | ||
return lastBlock.argument !== null && lastBlock.argument.type === 'JSXElement' | ||
} | ||
@@ -148,0 +148,0 @@ } |
{ | ||
"name": "babel-plugin-add-react-displayname", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Automatically add displayName to all your components", | ||
@@ -11,2 +11,3 @@ "main": "index.js", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.4", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-0": "^6.16.0", | ||
@@ -13,0 +14,0 @@ "mocha": "^3.0.2", |
@@ -1,2 +0,2 @@ | ||
// Stateless componenet with an arrow function | ||
// Stateless component with an arrow function | ||
var Component2 = ({ value }) => { | ||
@@ -3,0 +3,0 @@ return React.createElement( |
@@ -1,2 +0,2 @@ | ||
// Stateless componenet with an arrow function | ||
// Stateless component with an arrow function | ||
var Component2 = ({value}) => { | ||
@@ -3,0 +3,0 @@ return ( |
17177
24
520
7