{ escapeHTML( apiError.message ) }
);
} else {
error.message = __( 'An unknown error occurred which prevented the block from being updated.', 'woo-gutenberg-products-block' );
}
this.setState( { error: false } ); // Force update if error stays same.
this.setState( { product: false, loaded: true, error: error } );
} );
}
getInspectorControls() {
const {
attributes,
setAttributes,
overlayColor,
setOverlayColor,
} = this.props;
const url =
attributes.mediaSrc || getImageSrcFromProduct( this.state.product );
const { focalPoint = { x: 0.5, y: 0.5 } } = attributes;
return (