Hacker News new | ask | show | jobs
by _rknLA 5175 days ago
Why is this discussion about semi-colon insertion and not about the use of short-circuiting as a replacement for specific 'if' statements and general inconsistency in the project?

https://github.com/twitter/bootstrap/blob/master/js/bootstra...

https://github.com/twitter/bootstrap/blob/master/js/bootstra...

(Incidentally, would lines 54/56 of bootstrap-modal suffer from the same problem? Or does the fact that the last function call on line 54 is already in an && expression change things)

I'm kind of surprised that the bug wasn't fixed by changing the line to `isActive || $parent.toggleClass('open')` as is done here https://github.com/twitter/bootstrap/blob/master/js/bootstra...