diff options
Diffstat (limited to 'src/util/html.js')
-rw-r--r-- | src/util/html.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/html.js b/src/util/html.js index 0a586223..6c429b92 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -72,6 +72,10 @@ export function tag(tagName, ...args) { } if (Array.isArray(content)) { + if (content.some(item => Array.isArray(item))) { + throw new Error(`Found array instead of string (tag) or null/falsey, did you forget to \`...\` spread an array or fragment?`); + } + const joiner = attrs?.[joinChildren]; content = content.filter(Boolean).join( (joiner |