Fix Sonar warnings in JavaScript.