Correct some logic to populate the `defaultValue` variable when `data.defaultValue` begins with a hash symbol.

Props antpb
Fixes #30125


git-svn-id: https://develop.svn.wordpress.org/trunk@30087 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2014-10-29 02:42:35 +00:00
parent e36f06a87f
commit d62320bff5
1 changed files with 2 additions and 0 deletions

View File

@ -554,6 +554,8 @@ class WP_Customize_Color_Control extends WP_Customize_Control {
if ( data.defaultValue ) {
if ( '#' !== data.defaultValue.substring( 0, 1 ) ) {
defaultValue = '#' + data.defaultValue;
} else {
defaultValue = data.defaultValue;
}
defaultValue = ' data-default-color=' + defaultValue; // Quotes added automatically.
} #>