Not if the law allows them to do it.If the state legislature can change the results over the will of the majority of voters, it is an illegal action.
You do not have the right to vote for President - your state grants you that privilege, and sets the terms/conditions attached to same.Denying US citizens their right to vote should be illegal,