Yoga Sūtra Chapter Two verse 8
दुःखानुशयी द्वेषः ॥८॥
duḥkha-anuśayī dveṣaḥ ||8||
Aversion is the consequence of suffering.duḥkha - suffering, pain, sorrowfulanuśayin - following upon, connected with as a consequencedveṣa - aversion, hatred. dislike, repugnance
Commentaries and ReflectionsT Krishnamacharya:
What is unpleasant is not desired.
The response of the mind is then to move away from it.
Whether in fact such a step did prevent Duḥkha is not immediately evident.