Be sincere to Allaah and keep your duty to Him at times of happiness and difficulty. Do not be like the one who worships Allaah on an edge.
And among mankind is he who worships Allah as it were, upon the very edge (i.e. in doubt); if good befalls him, he is content therewith; but if a trial befalls him, he turns back on his face (i.e. reverts back to disbelief after embracing Islam). He loses both this world and the Hereafter. That is the evident loss.
[Qur’aan 22:11 – Translation Muhsin Khan]
Narrated Ibn `Abbas:
Regarding the Verse: "And among men is he who worships Allah's as it were on the very edge." [Qur’aan 22:11].
A man used to come to Al-Madina and if his wife brought a son and his mares produced offspring, he would say, "This religion (Islam) is good," but if his wife did not give birth to a child and his mares produced no offspring, he would say, "This religion is bad."
[Sahih Al-Bukhaari Hadith No. 4742]