Skip to content

Commit

Permalink
fix(FEC-10472): spinner doesn't show up (#541)
Browse files Browse the repository at this point in the history
Issue: props didn't pass correctly to cloneElement since it has changed on the last upgrade.
Solution: use cloneElement correctly and remove @babel/plugin-transform-spread which doesn't need anymore.
  • Loading branch information
Yuvalke committed Sep 7, 2020
1 parent 03ed799 commit 56a6ea7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 0 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-transform-property-mutators",
"@babel/plugin-proposal-object-rest-spread",
[
"@babel/plugin-transform-spread",
{
"loose": true
}
],
[
"@babel/plugin-proposal-decorators",
{
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
"@babel/plugin-transform-property-mutators": "^7.10.4",
"@babel/plugin-transform-react-jsx": "^7.10.4",
"@babel/plugin-transform-spread": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/preset-flow": "^7.10.4",
"@babel/register": "^7.10.5",
Expand Down
11 changes: 4 additions & 7 deletions src/components/smart-container/smart-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,12 @@ class SmartContainer extends Component {
renderChildren(props: any): React$Element<any> {
const children = toChildArray(props.children).map(child => {
if (child) {
return cloneElement(
child,
{
pushRef: ref => {
props.addAccessibleChild(ref);
}
return cloneElement(child, {
pushRef: ref => {
props.addAccessibleChild(ref);
},
...this.props
);
});
}
});
return children;
Expand Down

0 comments on commit 56a6ea7

Please sign in to comment.