From 17f1220718f0e736723108042fc00cd5cb90070d Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 5 Apr 2023 15:41:38 -0300 Subject: html: standard blank() function For now this just returns an empty array, but if we need to make changes later, it won't require editing all instances of blank content! --- src/util/html.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/html.js b/src/util/html.js index a7b44ec6..be267003 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -38,6 +38,10 @@ export const joinChildren = Symbol(); // or when there are multiple children. export const noEdgeWhitespace = Symbol(); +export function blank() { + return []; +} + export function tag(tagName, ...args) { let content; let attributes; @@ -408,7 +412,7 @@ export class Template { : item.valueOf())); return new Tag(null, null, contents).valueOf(); } else { - return []; + return blank(); } } -- cgit 1.3.0-6-gf8a5