* Set default value for orders var

* Add changelog

* Add PR # to the changelog

* Return default orders in the early return statement

* Adding the default value for the order var

* Revert the early return changes
This commit is contained in:
Moon 2021-08-13 12:27:54 -07:00 committed by GitHub
parent a53c618138
commit affea0b25d
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: Fix
Fix blank screen by setting a default value #7506

View File

@ -227,7 +227,7 @@ function OrdersPanel( { countUnreadOrders, orderStatuses } ) {
} ),
[ orderStatuses ]
);
const { orders, isRequesting, isError } = useSelect( ( select ) => {
const { orders = [], isRequesting, isError } = useSelect( ( select ) => {
const { getItems, getItemsError, isResolving } = select(
ITEMS_STORE_NAME
);