The PA legislature has decided how the state chooses its electors and written it into law. I think the state Supreme Court has a say if the legislature tries to unilaterally change a law passed by them and signed by the governor.
Like I said in that post, this is a last resort, not a first resort.
I think the legislature has a duty to act if it is likely that the state will not be represented in the Electoral College. In think that in that case, SCOTUS would side with the legislature.
-PJ