Skip to content

Commit

Permalink
Merge pull request #631 from sveltejs/gh-623-b
Browse files Browse the repository at this point in the history
Fix the missing component check
  • Loading branch information
Rich-Harris authored Jun 12, 2017
2 parents 728594b + 3aaec88 commit 6a4c0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validate/html/validateElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function validateElement(validator: Validator, node: Node) {
const isComponent =
node.name === ':Self' || validator.components.has(node.name);

if (!isComponent && node.name[0] === node.name[0].toUpperCase()) {
if (!isComponent && /^[A-Z]/.test(node.name[0])) {
// TODO upgrade to validator.error in v2
validator.warn(`${node.name} component is not defined`, node.start);
}
Expand Down

0 comments on commit 6a4c0fb

Please sign in to comment.