Fixing references to null value throwing errors on products task (https://github.com/woocommerce/woocommerce-admin/pull/7934)

This commit is contained in:
Joel Thiessen 2021-11-15 16:48:14 -08:00 committed by GitHub
parent 126707eeab
commit 1ccb1f6e1d
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ export default function ProductTemplateModal( { onClose } ) {
const removeSubscriptions =
( window.wcAdminFeatures && ! window.wcAdminFeatures.subscriptions ) ||
countryCode !== 'US' ||
! profileItems.product_types.includes( 'subscriptions' ) ||
! profileItems.product_types?.includes( 'subscriptions' ) ||
! installedPlugins.includes( 'woocommerce-payments' );
const productTemplates = removeSubscriptions

View File

@ -123,7 +123,7 @@ const Products = () => {
window.wcAdminFeatures &&
window.wcAdminFeatures.subscriptions &&
countryCode === 'US' &&
profileItems.product_types.includes( 'subscriptions' ) &&
profileItems.product_types?.includes( 'subscriptions' ) &&
installedPlugins.includes( 'woocommerce-payments' )
) {
const task = subTasks.find(