Fix JavaScript comparison error and indentation