Skip to content

Commit

Permalink
generator: stop editing of Auto variant early to avoid console errors #…
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Feb 5, 2023
1 parent a046b93 commit bc135b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions static/js/variant.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,12 @@ 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( 'custom-variant-style' );
var write_style = this.findLoadedStylesheet( 'variant-style' );
Expand Down

0 comments on commit bc135b4

Please sign in to comment.