The islands ' sugar industry was hurt by the emancipation of the slaves in 1834 .