From 2952841fb9ce89ed8f8f9d8ffbb3031deead3513 Mon Sep 17 00:00:00 2001 From: Zhou xiao Date: Mon, 19 Dec 2022 16:30:48 +0800 Subject: [PATCH] fix(vm-sandbox): handling the style null value (#583) --- packages/browser-vm/src/dynamicNode/processor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/browser-vm/src/dynamicNode/processor.ts b/packages/browser-vm/src/dynamicNode/processor.ts index 0457182ef..4a3cbf288 100644 --- a/packages/browser-vm/src/dynamicNode/processor.ts +++ b/packages/browser-vm/src/dynamicNode/processor.ts @@ -254,7 +254,7 @@ export class DynamicNodeProcessor { return originAddRule.apply(this, arguments); }; } else { - if (addedNodes[0]) { + if (addedNodes[0]?.textContent) { addedNodes[0].textContent = modifyStyleCode( addedNodes[0].textContent, );