Skip to content

Commit 62a0a5a

Browse files
arperrylencioni
authored andcommitted
getIndentation fix
1 parent 1eaaa11 commit 62a0a5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/rules/jsx-closing-bracket-location.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ module.exports = {
155155
function getIndentation(tokens, expectedLocation) {
156156
switch (expectedLocation) {
157157
case 'props-aligned':
158-
return /^\s*/.exec(sourceCode[tokens.lastProp.lastLine])[0];
158+
return /^\s*/.exec(sourceCode.lines[tokens.lastProp.lastLine])[0];
159159
case 'tag-aligned':
160-
return /^\s*/.exec(sourceCode[tokens.opening.line])[0];
160+
return /^\s*/.exec(sourceCode.lines[tokens.opening.line])[0];
161161
case 'line-aligned':
162-
return /^\s*/.exec(sourceCode[tokens.openingStartOfLine.line])[0];
162+
return /^\s*/.exec(sourceCode.lines[tokens.openingStartOfLine.line])[0];
163163
default:
164164
return '';
165165
}

0 commit comments

Comments
 (0)