Reviews blocks: Fix warnings with components state (https://github.com/woocommerce/woocommerce-blocks/pull/908)
This commit is contained in:
parent
3605ae580c
commit
ce30a9f1ff
|
@ -17,7 +17,7 @@ const withReviews = ( OriginalComponent ) => {
|
|||
|
||||
this.state = {
|
||||
error: null,
|
||||
loading: false,
|
||||
loading: true,
|
||||
reviews: [],
|
||||
totalReviews: 0,
|
||||
};
|
||||
|
@ -52,6 +52,12 @@ const withReviews = ( OriginalComponent ) => {
|
|||
);
|
||||
}
|
||||
|
||||
componentWillUnMount() {
|
||||
if ( this.delayedAppendReviews.cancel ) {
|
||||
this.delayedAppendReviews.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
getArgs( reviewsToSkip ) {
|
||||
const { categoryIds, order, orderby, productId, reviewsToDisplay } = this.props;
|
||||
const args = {
|
||||
|
|
Loading…
Reference in New Issue