Whoever is guilty of a trespass or injury or whoever owes another unliquidated damages or demands arising out of a contract may at any time, before or after suit is brought, tender what he or she shall conceive sufficient amends for the injury done or to pay the unliquidated damages or demands; and if suit has been commenced, also the costs of suit up to the time of making the tender. If it appears that the sum tendered was sufficient amends for the injury done or to pay the damages, and if suit has been commenced was also sufficient to pay the costs of suit up to the time of making the tender, the plaintiff shall not be allowed to recover any costs incurred after the tender, but shall be liable to the defendant for the defendant's costs incurred after that time.
735 ILCS 5/5-126