[Components]: fixed a bug in JS