Each attribute doesnt need a loading indicator
This commit is contained in:
parent
bd48a9e397
commit
21b0f59efc
|
@ -2125,12 +2125,8 @@ var UncachedProductAttributeElement = withAPIData(function (props) {
|
|||
addTerm = _ref2.addTerm,
|
||||
removeTerm = _ref2.removeTerm;
|
||||
|
||||
if (!terms.data) {
|
||||
return __('Loading');
|
||||
}
|
||||
|
||||
if (0 === terms.data.length) {
|
||||
return __('No attribute options found');
|
||||
if (!terms.data || 0 === terms.data.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Populate cache.
|
||||
|
|
|
@ -191,12 +191,8 @@ const UncachedProductAttributeElement = withAPIData( ( props ) => {
|
|||
terms: '/wc/v2/products/attributes/' + props.attribute.id + '/terms'
|
||||
};
|
||||
} )( ( { terms, selectedAttribute, selectedTerms, attribute, setSelectedAttribute, addTerm, removeTerm } ) => {
|
||||
if ( ! terms.data ) {
|
||||
return __( 'Loading' );
|
||||
}
|
||||
|
||||
if ( 0 === terms.data.length ) {
|
||||
return __( 'No attribute options found' );
|
||||
if ( ! terms.data || 0 === terms.data.length ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Populate cache.
|
||||
|
|
Loading…
Reference in New Issue