Skip to content

Commit

Permalink
allow uppercase elements in strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx authored Nov 6, 2024
1 parent 0774f9c commit fbe1f89
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/@glimmer/syntax/lib/v2/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,13 +762,6 @@ class ElementNormalizer {
let inScope = variable[0] === '@' || variable === 'this' || this.ctx.hasBinding(variable);

if (this.ctx.strict && !inScope) {
if (uppercase) {
throw generateSyntaxError(
`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()}>\``,
loc
);
}

// In strict mode, values are always elements unless they are in scope
return 'ElementHead';
}
Expand Down

0 comments on commit fbe1f89

Please sign in to comment.