From 67dc86cfa4e93feabf834e2524c9a3978155d699 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 14 Dec 2021 22:54:28 +0100 Subject: [PATCH] webconfig: Skip colors not named in a theme This is a stop gap. Ideally setting a theme would be idempotent. You set it, all colors change to match it, even the ones it does not specify. However, I do not believe we can *erase* colors that aren't set, and we don't currently do so in the CLI version. So skip setting these at all, for now. If a color is mentioned but empty, it will be set to empty. --- share/tools/web_config/js/controllers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/tools/web_config/js/controllers.js b/share/tools/web_config/js/controllers.js index ca5319f27..d2d7733e8 100644 --- a/share/tools/web_config/js/controllers.js +++ b/share/tools/web_config/js/controllers.js @@ -177,7 +177,7 @@ controllers.controller("colorsController", function($scope, $http) { // js is dumb - the empty string is false, // but we want that to mean unsetting a var. if (!$scope.selectedColorScheme[realname] && $scope.selectedColorScheme[realname] !== '') { - selected = ''; + continue; } else { selected = $scope.selectedColorScheme[realname]; }