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>,
|
var _ref2 = <div>child</div>;
|
||||||
AppItem = () => {
|
|
||||||
|
const AppItem = () => {
|
||||||
return _ref2;
|
return _ref2;
|
||||||
},
|
},
|
||||||
_ref = <div>
|
_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;
|
export default Parent;
|
||||||
|
|
||||||
let _ref2 = <div className="child">
|
var _ref2 = <div className="child">
|
||||||
ChildTextContent
|
ChildTextContent
|
||||||
</div>,
|
</div>;
|
||||||
Child = () => _ref2,
|
|
||||||
|
let Child = () => _ref2,
|
||||||
_ref = <div className="parent">
|
_ref = <div className="parent">
|
||||||
<Child />
|
<Child />
|
||||||
</div>;
|
</div>;
|
||||||
@ -172,12 +172,10 @@ export default class PathHoister {
|
|||||||
// Beginning of the scope
|
// Beginning of the scope
|
||||||
!path.parentPath ||
|
!path.parentPath ||
|
||||||
// Has siblings and is a statement
|
// Has siblings and is a statement
|
||||||
(Array.isArray(path.container) && path.isStatement()) ||
|
(Array.isArray(path.container) && path.isStatement())
|
||||||
// Is part of multiple var declarations
|
) {
|
||||||
(path.isVariableDeclarator() &&
|
return path;
|
||||||
path.parentPath.node !== null &&
|
}
|
||||||
path.parentPath.node.declarations.length > 1))
|
|
||||||
{return path;}
|
|
||||||
} while ((path = path.parentPath));
|
} while ((path = path.parentPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user