I think she knew days before the election she was going to lose.
Even the author recognized that Hillary would lose. She writes about lack of energy and weak response to her campaign as close as a month before the election. This was the portent of doom. And yet, the author admits her suspicions and then spends the rest of her article explaining why Hillary was “denied” her rightful place in American history.