fix bug in JS compiler related to transition with no event