The number of politicians that have had their careers ended due to affairs is enumerable. Yes, affairs do impact elections. And the law doesn't stipulate whether or not the thing being hushed up will influence an election, it's when it is done TO influence an election.