Skip to content

Commit 884d7b2

Browse files
committed
try to satisfy ESLint version > 3
1 parent 753f4ca commit 884d7b2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/rules/jsx-sort-props.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,12 @@ function getGroupsOfSortableAttributes(attributes, context) {
153153
const attribute = attributes[i];
154154
const nextAttribute = attributes[i + 1];
155155
const attributeline = attribute.loc.start.line;
156-
const comment = sourceCode.getCommentsAfter(attribute) ? sourceCode.getCommentsAfter(attribute) : [];
156+
let comment = []
157+
try {
158+
comment = sourceCode.getCommentsAfter(attribute)
159+
} catch (e) {
160+
} finally {
161+
}
157162
const lastAttr = attributes[i - 1];
158163
const attrIsSpread = attribute.type === 'JSXSpreadAttribute';
159164

0 commit comments

Comments
 (0)