Skip to content

Commit

Permalink
🎨 Protect against unhandled error
Browse files Browse the repository at this point in the history
  • Loading branch information
DanPurdy committed Oct 19, 2016
1 parent b7bcb3a commit c8f2e6c
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 c8f2e6c

Please sign in to comment.