Skip to content

Commit b7b4511

Browse files
Revert "allow uppercase elements in strict mode (#1650)" (#1651)
This reverts commit aefd600.
1 parent aefd600 commit b7b4511

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/@glimmer/syntax/lib/v2/normalize.ts

+7
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,13 @@ class ElementNormalizer {
762762
let inScope = variable[0] === '@' || variable === 'this' || this.ctx.hasBinding(variable);
763763

764764
if (this.ctx.strict && !inScope) {
765+
if (uppercase) {
766+
throw generateSyntaxError(
767+
`Attempted to invoke a component that was not in scope in a strict mode template, \`<${variable}>\`. If you wanted to create an element with that name, convert it to lowercase - \`<${variable.toLowerCase()}>\``,
768+
loc
769+
);
770+
}
771+
765772
// In strict mode, values are always elements unless they are in scope
766773
return 'ElementHead';
767774
}

0 commit comments

Comments
 (0)