Two days before the election and three weeks after Joseph's comments about Hyrum's taking over as prophet, Hyrum Smith announces to a large assembly that it was the will of God that the Saints should vote for the Democratic candidate. The next day, before the election, Joseph Smith preaches at the Sunday gathering and says, "Brother Hyrum tells me this morning that he has had a testimony to the effect that it would be better for the people to vote for Hoge; and I never knew Hyrum to say that he had a revelation and it failed. Let God speak and all men hold their peace." Joseph had promised his support to the Whig party but had changed his mind. The Mormon vote allowed Joseph Hoge to win a close race without Joseph, technically, breaking his promise.
[Source: On This Day in Mormon History, http://onthisdayinmormonhistory.blogspot.com]