@babel/plugin-transform-react-constant-elements
Advanced tools
Comparing version 7.18.9 to 7.18.12
@@ -145,3 +145,2 @@ "use strict"; | ||
if (HOISTED.has(path.node)) return; | ||
HOISTED.set(path.node, path.scope); | ||
const name = path.node.openingElement.name; | ||
@@ -170,2 +169,3 @@ let mutablePropsAllowed = false; | ||
(_jsxScope = jsxScope) != null ? _jsxScope : jsxScope = path.scope; | ||
HOISTED.set(path.node, jsxScope); | ||
const visitorState = { | ||
@@ -182,3 +182,2 @@ isImmutable: true, | ||
} = visitorState; | ||
HOISTED.set(path.node, targetScope); | ||
@@ -199,2 +198,3 @@ for (let currentScope = jsxScope;;) { | ||
}); | ||
HOISTED.set(path.node, targetScope); | ||
let replacement = _core.template.expression.ast` | ||
@@ -201,0 +201,0 @@ ${_core.types.identifier(id)} || (${_core.types.identifier(id)} = ${path.node}) |
{ | ||
"name": "@babel/plugin-transform-react-constant-elements", | ||
"version": "7.18.9", | ||
"version": "7.18.12", | ||
"description": "Treat React JSX elements as value types and hoist them to the highest scope", | ||
@@ -26,3 +26,3 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/core": "^7.18.9", | ||
"@babel/core": "^7.18.10", | ||
"@babel/helper-plugin-test-runner": "^7.18.6" | ||
@@ -29,0 +29,0 @@ }, |
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