授業中に彼女は迷わず居眠りをしてしまった。

English Translation

During the class she fell asleep in spite of herself.

Doesn’t 迷わず mean “not giving into temptation”?