Consider pre-flight wc-api requests to be “requesting”.
This commit is contained in:
parent
16f24a31ba
commit
d28eb0bcc9
|
@ -33,11 +33,7 @@ const isGetOrdersRequesting = getResource => ( query = {} ) => {
|
||||||
const resourceName = getResourceName( 'order-query', query );
|
const resourceName = getResourceName( 'order-query', query );
|
||||||
const { lastRequested, lastReceived } = getResource( resourceName );
|
const { lastRequested, lastReceived } = getResource( resourceName );
|
||||||
|
|
||||||
if ( isNil( lastRequested ) ) {
|
if ( isNil( lastRequested ) || isNil( lastReceived ) ) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( isNil( lastReceived ) ) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,7 @@ const isGetReportItemsRequesting = getResource => ( type, query = {} ) => {
|
||||||
const resourceName = getResourceName( `report-items-query-${ type }`, query );
|
const resourceName = getResourceName( `report-items-query-${ type }`, query );
|
||||||
const { lastRequested, lastReceived } = getResource( resourceName );
|
const { lastRequested, lastReceived } = getResource( resourceName );
|
||||||
|
|
||||||
if ( isNil( lastRequested ) ) {
|
if ( isNil( lastRequested ) || isNil( lastReceived ) ) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( isNil( lastReceived ) ) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,7 @@ const isReportStatsRequesting = getResource => ( type, query = {} ) => {
|
||||||
const resourceName = getResourceName( `report-stats-query-${ type }`, query );
|
const resourceName = getResourceName( `report-stats-query-${ type }`, query );
|
||||||
const { lastRequested, lastReceived } = getResource( resourceName );
|
const { lastRequested, lastReceived } = getResource( resourceName );
|
||||||
|
|
||||||
if ( isNil( lastRequested ) ) {
|
if ( isNil( lastRequested ) || isNil( lastReceived ) ) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( isNil( lastReceived ) ) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue