From 21b0f59efc32b447bdc1981348efd18c73753235 Mon Sep 17 00:00:00 2001 From: claudiulodro Date: Fri, 2 Mar 2018 09:16:28 -0800 Subject: [PATCH] Each attribute doesnt need a loading indicator --- plugins/woocommerce-blocks/assets/js/products-block.js | 8 ++------ .../assets/js/views/attribute-select.jsx | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/plugins/woocommerce-blocks/assets/js/products-block.js b/plugins/woocommerce-blocks/assets/js/products-block.js index 90fb918e0b9..c075eecba40 100644 --- a/plugins/woocommerce-blocks/assets/js/products-block.js +++ b/plugins/woocommerce-blocks/assets/js/products-block.js @@ -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. diff --git a/plugins/woocommerce-blocks/assets/js/views/attribute-select.jsx b/plugins/woocommerce-blocks/assets/js/views/attribute-select.jsx index b9ce7d4679d..b0756c1216d 100644 --- a/plugins/woocommerce-blocks/assets/js/views/attribute-select.jsx +++ b/plugins/woocommerce-blocks/assets/js/views/attribute-select.jsx @@ -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.