Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 64b14fe

Browse files
committed
Prepare for version 1.5.4
1 parent c3ba86e commit 64b14fe

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Version 1.5.4
2+
* Fix crash caused by multiline case statements that fall through for validateIndentation rule (Mike Sherov)
3+
14
Version 1.5.3
25
* Add missing rules in jQuery preset (Oleg Gaidarenko)
36
* Exclude comma operator from requireSpaceBeforeBinaryOperators rule (Oleg Gaidarenko)

jscs-browser.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4623,10 +4623,15 @@ module.exports.prototype = {
46234623
var childrenProperty = indentableNodes[node.type];
46244624
var children = node[childrenProperty];
46254625

4626-
if (children.length > 1 || children[0].type !== 'BlockStatement') {
4626+
if (children.length > 1 ||
4627+
(children[0] && children[0].type !== 'BlockStatement')) {
46274628
markChildren(node);
46284629
markPop(node, 1, true);
46294630
markPushAndCheck(node, 1);
4631+
} else if (children.length === 0) {
4632+
linesToCheck[node.loc.start.line - 1].push = 1;
4633+
linesToCheck[node.loc.start.line - 1].check = true;
4634+
markPop(node, 1, true);
46304635
}
46314636
});
46324637

0 commit comments

Comments
 (0)