Skip to content

Commit

Permalink
fix: ensure colon is not null in typeColonSpacing reporter (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze authored and gajus committed Feb 24, 2017
1 parent 42ba3e4 commit 1242ab4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -45,7 +45,7 @@
"chai": "^3.5.0",
"conventional-changelog-lint": "^1.0.1",
"create-index": "^0.1.3",
"eslint": "^3.4.0",
"eslint": "^3.16.0",
"eslint-config-canonical": "1.8.1",
"gitdown": "^2.5.0",
"husky": "^0.11.7",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/typeColonSpacing/reporter.js
Expand Up @@ -17,7 +17,7 @@ export default (direction, context, {always, allowLineBreak}) => {
// Support optional names
// type X = { [string]: a }
// type X = string => string
if (colon.value !== ':') {
if (!colon || colon.value !== ':') {
return;
}

Expand Down

0 comments on commit 1242ab4

Please sign in to comment.