Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 055209f

Browse files
committed
Add object spread arguments back and disable eslint for those lines
1 parent 3c8647d commit 055209f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/body.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ export default class Body extends Component {
7979
constructor(props, context) {
8080
super(props);
8181

82-
const { args, shape, ...options } = props;
82+
const { args, children, shape, ...options } = props; // eslint-disable-line no-unused-vars
8383

8484
this.body = Bodies[shape](...args, options);
8585
World.addBody(context.engine.world, this.body);
8686
}
8787

8888
componentWillReceiveProps(nextProps) {
89-
const { ...options } = nextProps;
89+
const { args, children, shape, ...options } = nextProps; // eslint-disable-line no-unused-vars
9090

9191
Object.keys(options).forEach((option) => {
9292
if (option in this.body && this.props[option] !== nextProps[option]) {

src/native/components/body.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ export default class Body extends Component {
7979
constructor(props, context) {
8080
super(props);
8181

82-
const { args, shape, ...options } = props;
82+
const { args, children, shape, ...options } = props; // eslint-disable-line no-unused-vars
8383

8484
this.body = Bodies[shape](...args, options);
8585
World.addBody(context.engine.world, this.body);
8686
}
8787

8888
componentWillReceiveProps(nextProps) {
89-
const { ...options } = nextProps;
89+
const { args, children, shape, ...options } = nextProps; // eslint-disable-line no-unused-vars
9090

9191
Object.keys(options).forEach((option) => {
9292
if (option in this.body && this.props[option] !== nextProps[option]) {

0 commit comments

Comments
 (0)