Unless a state legislature passes a law that says the Electors of that state will follow the national popular vote. Then its perfectly legal in the eyes of all nine USSC judges.
Cute. Meanwhile, back in reality, I’m right. State legislatures can hook their EC to the popular vote if they want. They could hook it to another state’s vote. They can hook it to ANYTHING.
“Each state shall appoint, in such manner as the Legislature thereof may direct”
Not all states even used the vote at first. A few just did direct appointment. Legislature said “you lot, go vote for this guy”.