Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow uppercase elements in strict mode #1650

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading