From 4b2635abbcf16a94ac5b6facf41160f3c104461c Mon Sep 17 00:00:00 2001 From: qinhaoyan <30946345+qinhaoyan@users.noreply.github.com> Date: Fri, 17 Mar 2023 11:09:16 +0800 Subject: [PATCH] =?UTF-8?q?theme:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-core/src/utils/style-helper.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/amis-core/src/utils/style-helper.ts b/packages/amis-core/src/utils/style-helper.ts index 38846437d..d9b7a169a 100644 --- a/packages/amis-core/src/utils/style-helper.ts +++ b/packages/amis-core/src/utils/style-helper.ts @@ -255,7 +255,9 @@ export function insertCustomStyle( return; } const {value} = formatStyle(themeCss, classNames, id, defaultData); - insertStyle(value, id?.replace('u:', '') || uuid()); + if (value) { + insertStyle(value, id?.replace('u:', '') || uuid()); + } } /**