Skip to content

Commit

Permalink
getIndentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arperry authored and lencioni committed Oct 12, 2016
1 parent 1eaaa11 commit 62a0a5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rules/jsx-closing-bracket-location.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ module.exports = {
function getIndentation(tokens, expectedLocation) {
switch (expectedLocation) {
case 'props-aligned':
return /^\s*/.exec(sourceCode[tokens.lastProp.lastLine])[0];
return /^\s*/.exec(sourceCode.lines[tokens.lastProp.lastLine])[0];
case 'tag-aligned':
return /^\s*/.exec(sourceCode[tokens.opening.line])[0];
return /^\s*/.exec(sourceCode.lines[tokens.opening.line])[0];
case 'line-aligned':
return /^\s*/.exec(sourceCode[tokens.openingStartOfLine.line])[0];
return /^\s*/.exec(sourceCode.lines[tokens.openingStartOfLine.line])[0];
default:
return '';
}
Expand Down

0 comments on commit 62a0a5a

Please sign in to comment.