While swearing fealty to the Prophet (ﷺ) we did not take the oath to death but that we would not run away (from the battlefield).
Sahih Muslim Book 33, Hadith 105