PIM-3140: fix javascript