[#8449] Fix errors mentioned by JSHint