From dee54803177bcb4e1e230e8efc855a170880cdea Mon Sep 17 00:00:00 2001 From: susiwen8 Date: Tue, 31 Dec 2019 00:26:45 +0800 Subject: [PATCH] chore: use Boolean to filter TemplateChildNode (#569) --- packages/compiler-core/src/parse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-core/src/parse.ts b/packages/compiler-core/src/parse.ts index 9c3299a3..7d46f8ea 100644 --- a/packages/compiler-core/src/parse.ts +++ b/packages/compiler-core/src/parse.ts @@ -233,7 +233,7 @@ function parseChildren( } } - return removedWhitespace ? nodes.filter(node => node !== null) : nodes + return removedWhitespace ? nodes.filter(Boolean) : nodes } function pushNode(nodes: TemplateChildNode[], node: TemplateChildNode): void {