[javascript mode] Fix bad indentation below if

Closes #1662