
858 So.2d 1083 (2003)
E. Dan WOLF, D.V.M., Appellant,
v.
JAMES G. BARRIE, P.A., Appellee.
No. 2D03-746.
District Court of Appeal of Florida, Second District.
September 26, 2003.
Rehearing Denied November 7, 2003.
*1084 Mark W. Ciaravella of Mark W. Ciaravella, P.A., Tampa, and John G. Crivelli of John G. Crivelli, P.A., Tampa, for Appellant.
Michael R. Carey and Randall P. Mueller of Carey, O'Malley, Whitaker & Manson, P.A., Tampa, for Appellee.
NORTHCUTT, Judge.
The circuit court entered a temporary injunction against E. Dan Wolf, restraining him from practicing veterinary ophthalmology in fifteen counties and from soliciting, contacting, or disclosing names of patients he had treated while working at James G. Barrie, P.A. We reverse the injunction.
In 1992, Wolf began practicing veterinary ophthalmology at The Animal Eye Clinic, a division of Barrie, P.A. Barrie, P.A., also operated a general veterinary practice called Sunshine Animal Hospital, at a location separate from Animal Eye Clinic. At the inception of the business relationship, Wolf signed a restrictive covenant that provided:
During the term of [Wolf's] employment, except as contemplated herein, and for a period equal to twice the length of [Wolf's] employment with [Barrie, P.A.], subject to a minimum of 12 months and a maximum of 60 months, after termination of [his] employment with [Barrie, P.A.], regardless of the reason for such termination, [Wolf] shall not, directly or indirectly, for [his] own purpose or as an independent contractor, consultant, partner of joint venturer, or as an officer, director, stockholder, agent, employee or salesman for any person, firm, partnership, corporation or other entity, or otherwise;
i) Engage or have any interest in any activity or venture which involves the practice of Veterinary Ophthalmology medicine with[in] the territory or territories (or any part thereof) of Charlotte, Citrus, Desoto, Hardee, Hernando, Hillsborough, Lake, Lee,[1] Manatee, Orange, Osceola, Pasco, Pinellas, Polk, Sarasota, Seminole, and/or Lake County(ies) Florida; or
ii) Solicit, contact or disclose the names of, or any other information relating to, any patients or prospective patients at any time sold, solicited, or contacted by them or any other representative of [Barrie, P.A.]; (A.10).
On July 12, 2002, Barrie, P.A., sold the assets of Animal Eye Clinic to Florida Veterinary Specialists. Wolf began working as an independent contractor with FVS, but did not enter into a noncompete agreement with that entity. Several months later, in October 2002, Wolf terminated his arrangement with FVS and opened his own veterinary ophthalmology practice in Hillsborough County. Sometime in November 2002, FVS and Barrie, P.A., agreed to rescind the asset purchase agreement. The next month, Barrie, P.A., filed a lawsuit against Wolf seeking to enforce the 1992 covenant and to prevent him from practicing veterinary ophthalmology. After a hearing in January 2003, the circuit court entered the temporary injunction that is the subject of this appeal.
This noncompete agreement is governed by section 542.33(2)(a), Florida Statutes *1085 (1991). See Gupton v. Village Key & Saw Shop, Inc., 656 So.2d 475 (Fla.1995) (holding that the enforceability of a covenant not to compete is controlled by the law at the time the agreement took effect). The pertinent portion of that statute provides:
One who is employed as an agent, independent contractor, or employee may agree with his employer[] to refrain from carrying on or engaging in a similar business and from soliciting old customers of such employer within a reasonably limited time and area so long as... such employer continues to carry on a like business therein. Said agreements may, in the discretion of a court of competent jurisdiction, be enforced by injunction. However, the court shall not enter an injunction contrary to the public health, safety, or welfare or in any case where the injunction enforces an unreasonable covenant not to compete or where there is no showing of irreparable injury.
§ 542.33(2)(a), Fla. Stat. (1991) (emphasis supplied).
As we stated in Hapney v. Central Garage, Inc., 579 So.2d 127, 131 (Fla. 2d DCA 1991),[2]
A plain reading of section 542.33(2)(a) dispels any notion that the legislature intended to dispense with the bedrock requirement that covenants of this nature must relate to a legitimate business interest of the employer in order to restrict or impinge upon the right to pursue and earn a living guaranteed by our constitution.
The Hapney court held that the existence of a legitimate business interest of the employer that required protection was a condition precedent to the validity of a noncompete covenant. 579 So.2d at 134. Section 542.33(2)(a) requires that the employer must be engaged in the business that the covenant seeks to protect.[3] If the employer is not in a like business, it has no legitimate interest in protecting against competition in that business. See Premier Assoc. Ltd. v. Loper, 149 Ohio App.3d 660, 778 N.E.2d 630, 636 (2002) ("an employer which abandons its business may not enforce a covenant not to compete"); Hess v. Gebhard & Co., Inc., 570 Pa. 148, 808 A.2d 912, 923 (2002) (holding that employer no longer has a protectable business interest in preventing competition when it no longer engages in the business covered by the noncompete covenant); Hayes v. Altman, 438 Pa. 451, 266 A.2d 269, 272 (1970) ("having sold his practice, [the employer] need not worry about competition"); Gibson v. Eberle, 762 P.2d 777, 779 (Colo.Ct.App. 1988) ("covenantee's right to enforce [a covenant not to compete] ends with the termination or abandonment of the business"); LaRocca v. Howard-Reed Oil Co., *1086 277 S.W.2d 769, 772-73 (Tex.App.1955) ("the proper test to be applied is whether the interest which the covenant was designed to protect is still outstanding in the covenantee").[4]
When Wolf opened his new practice in October 2002, Barrie, P.A., no longer operated Animal Eye Clinic and was not in the business of veterinary ophthalmology. Thus, it had no legitimate business interest to protect from Wolf's competition. The condition precedent to the validity of the noncompete agreement did not exist. Hapney, 579 So.2d at 134.
Barrie, P.A., urges us not to adopt a strict rule that would nullify all covenants not to compete when a business ceases operation for any reason. It points out that a business might temporarily interrupt operation for a number of reasons, such as fire, product shortages, and product recalls. But those scenarios are not relevant here. Barrie, P.A., sold the assets of its veterinary ophthalmology practice. We offer no opinion on how a "temporary cessation of business" might affect a restrictive covenant governed by section 542.33 because that factual situation is not before us.
We must also address the effect of the rescission of the asset sale from Barrie, P.A., to FVS. Certainly those two entities could voluntarily undo their contract and place themselves back in the position they occupied on the date of the sale. See Pino v. Union Bankers Ins. Co., 627 So.2d 535, 536 (Fla. 3d DCA 1993); Restatement (Second) of Contracts § 283. But their agreement to rescind could not affect Wolf. Cf. Holley v. May, 75 So.2d 696, 697 (Fla. 1954) (holding that rescission based on mutual mistake of fact cannot be claimed against a third-party bona fide grantee without notice). Wolf was not a party to the rescinded contract, nor did the contract convey any rights to his services. Barrie, P.A., acknowledges it did not assign Wolf's noncompete covenant to FVS as part of the sale transaction. Legally it could not do so. See Corporate Express Office Prods., Inc. v. Phillips, 847 So.2d 406, 413 (Fla.2003) (interpreting section 542.33, Florida Statutes (1985), and holding that when a sale of assets includes a noncompete agreement the purchaser can only enforce the terms of such an agreement with the employee's consent).
The unwinding of the contract between Barrie, P.A., and FVS did not resurrect Barrie, P.A.'s agreement with Wolf. Wolf's relationship with Barrie, P.A., terminated when Barrie, P.A., sold its assets to FVS and went out of the veterinary ophthalmology business. That termination could not be unilaterally undone. Cf. Frumkes v. Beasley-Reed Broad. of Miami, Inc., 533 So.2d 942, 943 (Fla. 3d DCA 1988) (explaining that once an employee resigns, an employer cannot later fire that employee in order to gain the benefit of a restrictive covenant that applied only when the employee was terminated).
Barrie, P.A., cannot enforce the 1992 restrictive covenant against Wolf. We dissolve the temporary injunction with the filing of this opinion. Wolf raised many other issues in this appeal, but we need not discuss them because the covenant is unenforceable. We do not prohibit the filing of a motion for rehearing, but such a motion will not delay the dissolution of the injunction.
STRINGER and CANADY, JJ., concur.
NOTES
[1]  The injunction did not apply to Lee County because Wolf practiced there for many years with Barrie, P.A.'s knowledge.
[2]  Hapney was disapproved in Gupton, 656 So.2d at 476, to the extent that it held the 1990 amendments to section 542.33(2)(a) should be applied retroactively. The statute at issue in this case is the 1991 version of section 542.33(2)(a). Thus, to the extent that Hapney discusses the 1990 amendments, they are applicable here.
[3]  The present Florida statute addressing covenants not to compete states that

In determining the enforceability of a restrictive covenant, a court:
. . . .
2. May consider as a defense the fact that the person seeking enforcement no longer continues in business in the area or line of business that is the subject of the action to enforce the restrictive covenant only if such discontinuance of business is not the result of a violation of the restriction.
§ 542.335 (g), Fla. Stat. (2002). This case, however, does not arise under that version of the statute. In 1992, when Wolf and Barrie, P.A., entered their agreement, a "continuing business" was a condition to the validity of the covenant.
[4]  We reiterate that the present Florida statute, section 542.335, provides that the fact that the employer no longer continues in the business is a defense to enforcement. The out-of-state cases cited in this opinion may not be relevant to that issue.
