js coding bug fixed.

Signed-off-by: Jordan Haines <jordan@jordanairwave.co.uk>