fix PhantomJS and React error