From 9f14d4fa198f444e1a155a948c07f45d303e8669 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 10 Dec 2019 09:47:25 +0100 Subject: [PATCH] Fix sync button update --- src/selector_manager/view/ClassTagsView.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/selector_manager/view/ClassTagsView.js b/src/selector_manager/view/ClassTagsView.js index 803e22308..d19368b1c 100644 --- a/src/selector_manager/view/ClassTagsView.js +++ b/src/selector_manager/view/ClassTagsView.js @@ -77,8 +77,7 @@ export default Backbone.View.extend({ syncStyle() { const target = this.getTarget(); const style = target.getStyle(); - const hasStyle = !isEmpty(style); // Remove - console.log('syncStyle', { target, style, hasStyle }); + console.log('syncStyle', { target, style }); }, getStyleEmitter() { @@ -185,13 +184,15 @@ export default Backbone.View.extend({ const target = this.getTarget(); const sel = validSelectors || (target && target.getSelectors().getValid()) || []; + let hasStyle; if (target && config.componentFirst && sel.length) { const style = target.getStyle(); - const hasStyle = !isEmpty(style); + hasStyle = !isEmpty(style); console.log('checkSync', { style }); - $btnSyncEl && $btnSyncEl[hasStyle ? 'show' : 'hide'](); } + + $btnSyncEl && $btnSyncEl[hasStyle ? 'show' : 'hide'](); }), getTarget() {