Fix javascript regression introduced in e9b6b6f4bf

Ticket:	#3169