Each attribute doesnt need a loading indicator

This commit is contained in:
claudiulodro 2018-03-02 09:16:28 -08:00
parent bd48a9e397
commit 21b0f59efc
2 changed files with 4 additions and 12 deletions

View File

@ -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.

View File

@ -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.