babel-plugin-react-component-data-attribute
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -62,5 +62,11 @@ 'use strict'; | ||
function shouldProcessPotentialComponent(path, name, state) { | ||
if (!path.getFunctionParent().isProgram()) { | ||
// Babel 7 returns null instead of Program from path.getFunctionParent if parent is not a function | ||
if (typeof path.scope.getProgramParent === 'function') { | ||
if (!path.scope.getProgramParent()) { | ||
return false; | ||
} | ||
} else if (!path.getFunctionParent() || !path.getFunctionParent().isProgram()) { | ||
return false; | ||
} | ||
if (path.parentPath.isAssignmentExpression()) { | ||
@@ -67,0 +73,0 @@ return false; |
{ | ||
"name": "babel-plugin-react-component-data-attribute", | ||
"description": "Babel plugin to add a data attribute containing its component’s name to the top-level DOM node", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "author": "Chris Sauve <chrismsauve@gmail.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10752
203