ALBANY, N.Y. — New York Gov. Andrew Cuomo has signed legislation aimed at protecting union membership in the state should a pending U.S. Supreme Court case end in an adverse ruling for labor unions representing government workers.

The Democrat says the measure signed into law Thursday provides protections should the court rule against unions in Janus v. AFSCME Council 31. The case centers on a challenge to an Illinois law that allows unions representing government employees to collect fees from workers who choose not to join.

New York’s new legislation says unions representing public employees can’t be forced to provide full benefits of membership to workers who don’t pay for them in the form of union dues.

Organized labor leaders fear losing the court case will hurt the financial viability of unions.