mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
generator: stop editing of Auto variant early to avoid console errors #445
This commit is contained in:
parent
a046b9300f
commit
bc135b4b4c
1 changed files with 6 additions and 0 deletions
|
@ -352,6 +352,12 @@ var variants = {
|
||||||
|
|
||||||
changeColor: function( c, without_prompt ){
|
changeColor: function( c, without_prompt ){
|
||||||
var with_prompt = !(without_prompt || false);
|
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 read_style = this.findLoadedStylesheet( 'custom-variant-style' );
|
||||||
var write_style = this.findLoadedStylesheet( 'variant-style' );
|
var write_style = this.findLoadedStylesheet( 'variant-style' );
|
||||||
|
|
Loading…
Reference in a new issue