The Senate cleared the legislation on Friday in a 54-46 party line vote, with 10 members of the Senate Democratic caucus helping the bill advance to passage despite opposition from within their party — most vocally from colleagues in the House, who exhorted them to reject the bill out of hand.