Article II, Clause 2 of the U.S. Constitution: Each State shall appoint, in such Manner as the Legislature thereof may direct, a Number of Electors, equal to the whole Number of Senators and Representatives to which the State may be entitled in the Congress
It seems pretty cut and dry to me. It gives absolutely no guard rails, limits, directives, or even suggestions as to how those states' legislatures may appoint Electors. They can do it "in such manner as [they] may direct". The states have the latitude to decide how to assign and direct their Electors however they see fit.
It's already enough latitude that different states at different times have decided A) to give an elector to the winner of each district and two to the winner of that statewide winner, B) to give them all to the statewide winner, C) to have the legislature decide without a popular vote, and D) to hold a state vote and then ignore it anyway and let the legislature decide instead. And 13 states, still, fully allow individual "faithless" Electors to vote against their assigned/pledged candidate, and only 14 states will actually void and replace the electors who misplaced their vote (the other states where it is disallowed just give them a fine or criminally charge them but still let their vote stand)...
If that's the kind of latitude that is already settled law, then it would be absolutely insane to draw the line at assigning Electors on the will of the whole nation, i.e. of the entire body of people who has a pony in this race, and based on a compact that the states representing the majority of Americans agreed upon. It doesn't disenfranchise anyone, the current system does that.
I'm sure that it will be challenged. But there is absolutely no legal justification to overturn it.