diff --git a/static/js/variant.js b/static/js/variant.js index 33a274b921..c8812c9575 100644 --- a/static/js/variant.js +++ b/static/js/variant.js @@ -353,18 +353,18 @@ var variants = { changeColor: function( c, without_prompt ){ var with_prompt = !(without_prompt || false); - if( this.getVariant() == 'auto' ){ - if( with_prompt ){ - alert( 'The Auto variant can not be changed. Please select the light/dark variant directly to make changes' ); - } - return; - } var read_style = this.findLoadedStylesheet( 'R-custom-variant-style' ); var write_style = this.findLoadedStylesheet( 'R-variant-style' ); if( !read_style ){ read_style = write_style; } + if( !read_style ){ + if( with_prompt ){ + alert( 'A auto mode variant can not be changed. Please select its light/dark variant directly to make changes' ); + } + return; + } var e = this.findColor( c ); var v = this.getColorProperty( c, read_style );