When the notice required by Section 1161 states that the lessor or the landlord may elect to declare the forfeiture of the lease or rental agreement, that declaration shall be nullified and the lease or rental agreement shall remain in effect if the lessee or tenant performs within three days after service of the notice or if the breach is waived by the lessor or the landlord after service of the notice.