Skip to content

Commit a093afe

Browse files
Merge pull request #506 from Gillespie59/development
3.1.1
2 parents 7739546 + dfed97f commit a093afe

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": "eslint-plugin-angular",
3-
"version": "3.1.0",
3+
"version": "3.1.1",
44
"description": "ESLint rules for AngularJS projects",
55
"main": "index.js",
66
"scripts": {

rules/file-name.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function handleModuleCase(node, context, defaultFilename) {
4646
});
4747

4848
// Check that the definition is an import declaration.
49-
if (variable.defs[0].parent.type !== 'ImportDeclaration') {
49+
if (!(variable && variable.defs && variable.defs[0] && variable.defs[0].parent && variable.defs[0].parent.type === 'ImportDeclaration')) {
5050
return defaultFilename;
5151
}
5252

0 commit comments

Comments
 (0)