fix small regression in JS compiler