Skip to content

Commit 4cd830b

Browse files
committed
Fix issue in lack of decorators
1 parent 51d7dc1 commit 4cd830b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng2lint",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "A set of linters for Angular 2 applications, following https://github.com/mgechev/angular2-style-guide.",
55
"main": "index.js",
66
"scripts": {

src/selectorNameBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class SelectorNameValidatorWalker extends Lint.RuleWalker {
4949
}
5050

5151
visitClassDeclaration(node: ts.ClassDeclaration) {
52-
node.decorators.forEach(this.validateDecorator.bind(this, node.name.text));
52+
(node.decorators || []).forEach(this.validateDecorator.bind(this, node.name.text));
5353
super.visitClassDeclaration(node);
5454
}
5555

0 commit comments

Comments
 (0)