From 1fea0185fe0002524bd7cf2a28dc915e8f9d0aa2 Mon Sep 17 00:00:00 2001 From: Gan Eng Chin Date: Sat, 11 Mar 2023 00:31:23 +0800 Subject: [PATCH] Don't throw error in getCampaignTypes. In WP 5.9, if we throw error, there would be an uncaught promise, and it causes UI to break. --- .../client/marketing/data-multichannel/resolvers.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/woocommerce-admin/client/marketing/data-multichannel/resolvers.ts b/plugins/woocommerce-admin/client/marketing/data-multichannel/resolvers.ts index bef1d3e8791..984d0dd0000 100644 --- a/plugins/woocommerce-admin/client/marketing/data-multichannel/resolvers.ts +++ b/plugins/woocommerce-admin/client/marketing/data-multichannel/resolvers.ts @@ -128,7 +128,5 @@ export function* getCampaignTypes() { if ( isApiFetchError( error ) ) { yield receiveCampaignTypes( error ); } - - throw error; } }