Skip to content

Commit

Permalink
fix(eslint): 类没有命名时报错,#3092
Browse files Browse the repository at this point in the history
  • Loading branch information
yuche committed May 21, 2019
1 parent 2d455e8 commit d89e93a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/eslint-plugin-taro/rules/class-naming.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = {
return {
ClassDeclaration (node) {
const id = node.id
if (isTaroComponent(context, node) && DEFAULT_Components_SET.has(id.name)) {
if (isTaroComponent(context, node) && id && DEFAULT_Components_SET.has(id.name)) {
context.report({
message: ERROR_MESSAGE,
node: id
Expand Down

0 comments on commit d89e93a

Please sign in to comment.