babel-plugin-react-pure-component
Advanced tools
+1
-1
@@ -17,3 +17,3 @@ /** | ||
| VariableDeclarator: function VariableDeclarator(node) { | ||
| if (node.init.type === 'CallExpression' && node.init.callee.type === 'Identifier' && node.init.callee.name === 'pure') { | ||
| if (node.init && node.init.type === 'CallExpression' && node.init.callee.type === 'Identifier' && node.init.callee.name === 'pure') { | ||
| var displayName = node.id.name; | ||
@@ -20,0 +20,0 @@ return [node, t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.identifier(displayName), t.identifier('displayName')), t.literal(displayName)))]; |
+1
-1
| { | ||
| "name": "babel-plugin-react-pure-component", | ||
| "version": "0.1.4", | ||
| "version": "0.1.5", | ||
| "description": "Add displayName to components created with react-pure-component", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
2115
0.62%