The case you cite states that it is not unconstitutional to require a pledge from the candidates. However, it has never been litigated whether it is constitutional for a state to punish an elector that votes contrary to that pledge. In other words, the pledge may have no legal weight.
Where does the proposed law punish electors?