Set default value for performanceIndicators var (https://github.com/woocommerce/woocommerce-admin/pull/7343)
* Set default value for performanceIndicators var
This commit is contained in:
parent
40be342865
commit
303e6ff84c
|
@ -1,6 +1,12 @@
|
|||
# Testing instructions
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Fix WC Home crash when the Analytics is disabled.
|
||||
|
||||
1. Navigate to WooCommerce -> Settings -> Advanced -> Features. Uncheck Analytics and save the changes.
|
||||
2. Navigate to WooCommerce -> Home and confirm the page loads without an error.
|
||||
|
||||
### Fix missing translation strings for CES #7270
|
||||
|
||||
1. Navigate to Settings -> General and change the site language to a non-English (I've used Espanol for testing purposes).
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: Fix
|
||||
|
||||
Set default value for performanceIndicators variable #7343
|
|
@ -33,9 +33,10 @@ import { DEFAULT_STATS, DEFAULT_HIDDEN_STATS } from './defaults';
|
|||
import StatsList from './stats-list';
|
||||
import { InstallJetpackCTA } from './install-jetpack-cta';
|
||||
|
||||
const { performanceIndicators } = getSetting( 'dataEndpoints', {
|
||||
const { performanceIndicators = [] } = getSetting( 'dataEndpoints', {
|
||||
performanceIndicators: [],
|
||||
} );
|
||||
|
||||
const stats = performanceIndicators.filter( ( indicator ) => {
|
||||
return DEFAULT_STATS.includes( indicator.stat );
|
||||
} );
|
||||
|
|
Loading…
Reference in New Issue