File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,10 @@ module.exports = class Macros {
47
47
48
48
if (
49
49
this . builder . t . isCallExpression ( expression ) &&
50
- this . localDebugBindings . some ( b => b . get ( 'imported ' ) . node . name === expression . callee . name )
50
+ this . localDebugBindings . some ( b => b . get ( 'local ' ) . node . name === expression . callee . name )
51
51
) {
52
52
let imported = path . scope . getBinding ( expression . callee . name ) . path . node . imported . name ;
53
+ // The builder needs to be made aware of the the local name of the ImportSpecifier
53
54
this . builder [ `${ imported } ` ] ( path ) ;
54
55
}
55
56
}
@@ -62,12 +63,11 @@ module.exports = class Macros {
62
63
// import declaration in question seems to have already been removed
63
64
return ;
64
65
}
66
+
65
67
let specifiers = importPath . get ( 'specifiers' ) ;
66
68
67
69
if ( specifiers . length === this . localDebugBindings . length ) {
68
70
importPath . remove ( ) ;
69
- } else if ( specifiers . length === 1 ) {
70
- importPath . remove ( ) ;
71
71
} else {
72
72
this . localDebugBindings . forEach ( binding => binding . get ( 'local' ) . parentPath . remove ( ) ) ;
73
73
}
You can’t perform that action at this time.
0 commit comments