From d25461d34f6e9790d18cc667395268a32508fb2a Mon Sep 17 00:00:00 2001 From: shadow <81448108+shdwmtr@users.noreply.github.com> Date: Wed, 18 Dec 2024 21:56:12 -0400 Subject: [PATCH] fix: Properly handle theme config with invalid props. --- assets/core/util/webkit_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/core/util/webkit_handler.py b/assets/core/util/webkit_handler.py index 898dca85..61b3081f 100644 --- a/assets/core/util/webkit_handler.py +++ b/assets/core/util/webkit_handler.py @@ -137,7 +137,7 @@ def add_conditional_data(path: str, data: dict): parsed_patches = parse_conditional_patches(data) for patch in parsed_patches: - if patch['fileType'] == 'TargetCss': + if patch['fileType'] == 'TargetCss' and patch['targetPath'] is not None and patch['matchString'] is not None: add_browser_css(os.path.join(path, patch['targetPath']), patch['matchString']) - elif patch['fileType'] == 'TargetJs': + elif patch['fileType'] == 'TargetJs' and patch['targetPath'] is not None and patch['matchString'] is not None: add_browser_js(os.path.join(path, patch['targetPath']), patch['matchString'])