From 307276ac1c35b0b4034343ace6adf6fad7ff007c Mon Sep 17 00:00:00 2001 From: Milan Hauth Date: Sat, 5 Sep 2020 22:01:41 +0200 Subject: [PATCH] handle empty attributes and content --- src/compiler/preprocess/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/preprocess/index.ts b/src/compiler/preprocess/index.ts index a994878853..c8049ecb1e 100644 --- a/src/compiler/preprocess/index.ts +++ b/src/compiler/preprocess/index.ts @@ -157,6 +157,7 @@ export default async function preprocess( return no_change(); } attributes = attributes || ''; + content = content || ''; // run script preprocessor const processed = await fn({ @@ -192,6 +193,8 @@ export default async function preprocess( if (!attributes && !content) { return no_change(); } + attributes = attributes || ''; + content = content || ''; // run style preprocessor const processed: Processed = await fn({