[misc] Fixed possible JS error