Working out why the js bombs in the editor