From f6288edcf4f963523d2da0774879e328a21cfd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 24 Nov 2023 23:35:15 +0100 Subject: [PATCH] variant: fix auto mode variant download in stylesheet generator #679 --- static/js/variant.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/variant.js b/static/js/variant.js index c8812c9575..d79794ad46 100644 --- a/static/js/variant.js +++ b/static/js/variant.js @@ -361,7 +361,7 @@ var variants = { } 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' ); + alert( 'An auto mode variant can not be changed. Please select its light/dark variant directly to make changes' ); } return; } @@ -426,6 +426,10 @@ var variants = { if( !read_style ){ read_style = write_style; } + if( !read_style ){ + alert( 'An auto mode variant will be generated by Hugo and must not be stored in a separate stylesheet' ); + return; + } var style = '/* ' + this.customvariantname + ' */\n' +