@babel/plugin-proposal-optional-chaining
Advanced tools
Comparing version 7.18.6 to 7.18.9
@@ -174,10 +174,15 @@ 'use strict'; | ||
} = chain; | ||
let context = scope.maybeGenerateMemoised(object); | ||
let context; | ||
if (context) { | ||
chain.object = core.types.assignmentExpression("=", context, object); | ||
} else if (core.types.isSuper(object)) { | ||
if (core.types.isSuper(object)) { | ||
context = core.types.thisExpression(); | ||
} else { | ||
context = object; | ||
const memoized = scope.maybeGenerateMemoised(object); | ||
if (memoized) { | ||
context = memoized; | ||
chain.object = core.types.assignmentExpression("=", memoized, object); | ||
} else { | ||
context = object; | ||
} | ||
} | ||
@@ -184,0 +189,0 @@ |
{ | ||
"name": "@babel/plugin-proposal-optional-chaining", | ||
"version": "7.18.6", | ||
"version": "7.18.9", | ||
"description": "Transform optional chaining operators into a series of nil checks", | ||
@@ -20,4 +20,4 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.18.6", | ||
"@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", | ||
"@babel/helper-plugin-utils": "^7.18.9", | ||
"@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", | ||
"@babel/plugin-syntax-optional-chaining": "^7.8.3" | ||
@@ -29,6 +29,6 @@ }, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.6", | ||
"@babel/core": "^7.18.9", | ||
"@babel/helper-plugin-test-runner": "^7.18.6", | ||
"@babel/plugin-transform-block-scoping": "^7.18.6", | ||
"@babel/traverse": "^7.18.6" | ||
"@babel/plugin-transform-block-scoping": "^7.18.9", | ||
"@babel/traverse": "^7.18.9" | ||
}, | ||
@@ -35,0 +35,0 @@ "engines": { |
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
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
33413
213