And of the people is he who worships Allah on an edge

Allah says: {And of the people is he who worships Allah on an edge. If he is touched by good, he is reassured by it; but if he is struck by trial, he turns on his face. He has lost the worldly life and the Hereafter. That is the manifest loss} 22:11. What is the meaning of this holy verse?