Narrated Jabir bin ‘Abdullah :
We did not pledge to the Messenger of Allah (ﷺ) for death, but only that we would not flee.
[Abu 'Eisa said:] This Hadith is Hasan Sahih, meaning both of the Ahadith are Sahih. Some of his Companions pledged to him for death, they said only: We will not leave from in front of you as long as we are not killed. While others pledged him by saying: We will not flee.