Skip to content

Commit

Permalink
Fix destructuring of new/old props
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Nov 8, 2017
1 parent 5528e92 commit 24a6c25
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class ProductSearch extends Component {
}

componentWillReceiveProps( newProps ) {
const { oldSiteId } = this.props;
const { newSiteId } = newProps;
const { siteId: oldSiteId } = this.props;
const { siteId: newSiteId } = newProps;

if ( oldSiteId !== newSiteId ) {
this.props.fetchProducts( newSiteId, { offset: 0, per_page: 50 } );
Expand Down

0 comments on commit 24a6c25

Please sign in to comment.