Skip to content

Commit

Permalink
Merge pull request #405 from Gillespie59/development
Browse files Browse the repository at this point in the history
1.4.0
  • Loading branch information
EmmanuelDemey committed Jul 24, 2016
2 parents 8b65dc1 + 2e642c6 commit 509eb0c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-angular",
"version": "1.3.0",
"version": "1.3.1",
"description": "ESLint rules for AngularJS projects",
"main": "index.js",
"scripts": {
Expand All @@ -24,7 +24,7 @@
"chai": "^3.5.0",
"chai-spies": "^0.7.1",
"coveralls": "^2.11.6",
"eslint": "^2.0.0",
"eslint": "^3.0.0",
"espree": "^3.0.1",
"gulp": "^3.9.1",
"gulp-eslint": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion rules/di.js
Expand Up @@ -58,7 +58,7 @@ module.exports = angularRule(function(context) {
}

if (syntax === '$inject') {
if (fn.params.length === 0) {
if (!fn.params || fn.params.length === 0) {
return;
}
if (fn && fn.id && utils.isIdentifierType(fn.id)) {
Expand Down
6 changes: 3 additions & 3 deletions rules/no-inline-template.js
Expand Up @@ -30,13 +30,13 @@ module.exports = function(context) {
if (!allowSimple) {
context.report(node, 'Inline templates are not allowed. Use an external template instead');
}
if ((node.value.value.match(regularTagPattern) || []).length > 2) {
if ((node.value.value && node.value.value.match(regularTagPattern) || []).length > 2) {
return reportComplex(node);
}
if ((node.value.value.match(selfClosingTagPattern) || []).length > 1) {
if ((node.value.value && node.value.value.match(selfClosingTagPattern) || []).length > 1) {
return reportComplex(node);
}
if (node.value.raw.indexOf('\\') !== -1) {
if (node.value && node.value.raw.indexOf('\\') !== -1) {
reportComplex(node);
}
}
Expand Down

0 comments on commit 509eb0c

Please sign in to comment.