Skip to content

Commit

Permalink
fix watchers
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Oct 18, 2019
1 parent 7c6f3e2 commit 709b9b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/WCAGLinkColorControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ const WCAGLinkColorControl = wp.customize.Control.extend( {
control.recommendedColors = false;

const val = control.getAutoColor( parseInt( control.getHue(), 10 ), true );
const noChange = val === control.setting.get();

control.setting.set( val );

if ( noChange ) {
control.renderContent();
}
}, 100 ) );
} );

Expand All @@ -188,7 +194,13 @@ const WCAGLinkColorControl = wp.customize.Control.extend( {
control.recommendedColors = false;

const val = control.getAutoColor( parseInt( control.getHue(), 10 ), true );
const noChange = val === control.setting.get();

control.setting.set( val );

if ( noChange ) {
control.renderContent();
}
}, 100 ) );
} );
}
Expand Down

0 comments on commit 709b9b1

Please sign in to comment.