This was broken by a legacy attachment path conditional that is no longer needed.
This commit is contained in:
parent
c6eab0c206
commit
853b9f8ece
@ -4,8 +4,9 @@ export default class App extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
const _ref2 = <div>child</div>,
|
||||
AppItem = () => {
|
||||
var _ref2 = <div>child</div>;
|
||||
|
||||
const AppItem = () => {
|
||||
return _ref2;
|
||||
},
|
||||
_ref = <div>
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
import React from 'react';
|
||||
import Loader from 'loader';
|
||||
|
||||
const errorComesHere = () => <Loader className="full-height"/>,
|
||||
thisWorksFine = () => <Loader className="p-y-5"/>;
|
||||
@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
import Loader from 'loader';
|
||||
|
||||
var _ref = <Loader className="full-height" />;
|
||||
|
||||
var _ref2 = <Loader className="p-y-5" />;
|
||||
|
||||
const errorComesHere = () => _ref,
|
||||
thisWorksFine = () => _ref2;
|
||||
@ -4,10 +4,11 @@ const Parent = ({}) => _ref;
|
||||
|
||||
export default Parent;
|
||||
|
||||
let _ref2 = <div className="child">
|
||||
var _ref2 = <div className="child">
|
||||
ChildTextContent
|
||||
</div>,
|
||||
Child = () => _ref2,
|
||||
</div>;
|
||||
|
||||
let Child = () => _ref2,
|
||||
_ref = <div className="parent">
|
||||
<Child />
|
||||
</div>;
|
||||
</div>;
|
||||
@ -172,12 +172,10 @@ export default class PathHoister {
|
||||
// Beginning of the scope
|
||||
!path.parentPath ||
|
||||
// Has siblings and is a statement
|
||||
(Array.isArray(path.container) && path.isStatement()) ||
|
||||
// Is part of multiple var declarations
|
||||
(path.isVariableDeclarator() &&
|
||||
path.parentPath.node !== null &&
|
||||
path.parentPath.node.declarations.length > 1))
|
||||
{return path;}
|
||||
(Array.isArray(path.container) && path.isStatement())
|
||||
) {
|
||||
return path;
|
||||
}
|
||||
} while ((path = path.parentPath));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user