Skip to content

Commit

Permalink
Merge pull request #894 from DanPurdy/feature/patch-space-before-colon
Browse files Browse the repository at this point in the history
Prevent checking is of undefined
  • Loading branch information
bgriffith authored Oct 24, 2016
2 parents c53043e + 8f91e3c commit 6fd0341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/space-before-colon.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
if (delimiter.content === ':') {
var previous = parent.content[i - 1];

if (previous.is('space')) {
if (previous && previous.is('space')) {
if (!parser.options.include) {
result = helpers.addUnique(result, {
'ruleId': parser.rule.name,
Expand Down

0 comments on commit 6fd0341

Please sign in to comment.