From bc135b4b4cf0f2404e6d55edc8b477b7f7213988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 5 Feb 2023 11:40:47 +0100 Subject: [PATCH] generator: stop editing of Auto variant early to avoid console errors #445 --- static/js/variant.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/js/variant.js b/static/js/variant.js index 0d3c01718e4..e525a6cc4a0 100644 --- a/static/js/variant.js +++ b/static/js/variant.js @@ -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' );