File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ export default function afterEffectsJsx(options = { wrap: false }) {
8080 } ) ;
8181
8282 if ( wrap ) {
83+ // Remove expression globals and unsupported code
84+ // then wrap in get() method. Less work is needed in this case
85+ // everything is wrapped in a single function
8386 walk ( ast , {
8487 enter ( node , parent ) {
8588 Object . defineProperty ( node , 'parent' , {
@@ -92,8 +95,9 @@ export default function afterEffectsJsx(options = { wrap: false }) {
9295 const variableName = node . declarations . map (
9396 ( declaration ) => declaration . id . name
9497 ) [ 0 ] ;
98+
9599 if ( expressionGlobals . includes ( variableName ) ) {
96- // Remove variables that aren't exported
100+ // Remove temporary expression global declarations
97101 remove ( node . start , node . end ) ;
98102 }
99103 // don't process child nodes
You can’t perform that action at this time.
0 commit comments