fix up javascript for jsx-compiler