babel-plugin-transform-react-pure-to-component
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -34,3 +34,4 @@ 'use strict'; | ||
var superClassObject = superClass.get('object'); | ||
if (!superClassObject.isIdentifier() || !path.scope.hasBinding(superClassObject.node.name) || !isReactImport(path.scope.getBinding(superClassObject.node.name).path) || !superClass.get('property').isIdentifier({ name: 'PureComponent' })) { | ||
if (!superClassObject.isIdentifier() || path.scope.getBinding(superClassObject.node.name) == null || !isReactImport(path.scope.getBinding(superClassObject.node.name).path) || !superClass.get('property').isIdentifier({ name: 'PureComponent' })) { | ||
return; | ||
@@ -49,2 +50,7 @@ } | ||
var importBinding = path.scope.getBinding(superClassName); | ||
if (importBinding == null) { | ||
return; | ||
} | ||
var importPath = importBinding.path; | ||
@@ -51,0 +57,0 @@ |
{ | ||
"name": "babel-plugin-transform-react-pure-to-component", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Convert React.PureComponent to React.Component to improve hot reloading.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
126361
8
103
1