diff --git a/src/cli/error.ts b/src/cli/error.ts index b7ca813716..cfe6a3e72d 100644 --- a/src/cli/error.ts +++ b/src/cli/error.ts @@ -8,9 +8,9 @@ export default function error(err) { stderr(`${clorox.red(err.message || err)}`); if (err.frame) { - stderr(err.frame); // eslint-disable-line no-console + stderr(err.frame); } else if (err.stack) { - stderr(`${clorox.grey(err.stack)}`); + stderr(`${clorox.gray(err.stack)}`); } process.exit(1); diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts index a2a6f8d5b4..403b9cce8b 100644 --- a/src/compile/nodes/Element.ts +++ b/src/compile/nodes/Element.ts @@ -152,8 +152,14 @@ export default class Element extends Node { ); this.attributes.forEach(attr => { - if (attr.dependencies.size) { + if ( + attr.chunks && + attr.chunks.length && + (attr.chunks.length > 1 || attr.chunks[0].type !== 'Text') + ) { this.parent.cannotUseInnerHTML(); + } + if (attr.dependencies.size) { block.addDependencies(attr.dependencies); // special case —