File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
client/apps/shipping-label Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 3
3
*/
4
4
//from calypso
5
5
import {
6
- WOOCOMMERCE_SERVICES_SHIPPING_LABEL_EXIT_PRINTING_FLOW ,
6
+ WOOCOMMERCE_SERVICES_SHIPPING_LABEL_PURCHASE_RESPONSE ,
7
7
} from 'woocommerce/woocommerce-services/state/action-types' ;
8
8
9
9
const middlewareActions = {
10
- [ WOOCOMMERCE_SERVICES_SHIPPING_LABEL_EXIT_PRINTING_FLOW ] : ( ) => {
10
+ [ WOOCOMMERCE_SERVICES_SHIPPING_LABEL_PURCHASE_RESPONSE ] : ( { error } ) => {
11
+ if ( error ) {
12
+ return ;
13
+ }
11
14
window . wc_shipment_tracking_refresh && window . wc_shipment_tracking_refresh ( ) ;
12
15
} ,
13
16
} ;
@@ -22,5 +25,5 @@ export default () => ( next ) => ( action ) => {
22
25
}
23
26
24
27
// perform the action
25
- setTimeout ( ( ) => middlewareAction ( action ) ) ;
28
+ middlewareAction ( action ) ;
26
29
} ;
You can’t perform that action at this time.
0 commit comments