Kill the "shadow-functions.js" internal plugin in favor of an explicit helper (#5677)
* Handle arrow function processing via shared API rather than default plugin. * Fix a few small PR comments. * Preserve existing spec arrow 'this' rewrites, and support spec in subclass constructors.
This commit is contained in:
@@ -139,8 +139,7 @@ export default function () {
|
||||
|
||||
if (
|
||||
state.opts.allowTopLevelThis !== true &&
|
||||
!path.findParent((path) => !path.is("shadow") &&
|
||||
THIS_BREAK_KEYS.indexOf(path.type) >= 0)
|
||||
!path.findParent((path) => THIS_BREAK_KEYS.indexOf(path.type) >= 0)
|
||||
) {
|
||||
path.replaceWith(t.identifier("undefined"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user