If the lessor transfers the property leased, or any part thereof, or any part of his interest therein, the transferee, in the absence of a contract to the contrary, shall possess all the rights, and, if the lessee so elects, be subject to all the liabilities of the lessor as to the property or part transferred so long as he is the owner of it; but the lessor shall not, by reason only of such transfer cease to be subject to any of the liabilities imposed upon him by the lease, unless the lessee elects to treat the transferee as the person liable to him:
PROVIDED that the transferee is not entitled to arrears of rent due before the transfer, and that, if the lessee, not having reason to believe that such transfer has been made, pays rent to the lessor, the lessee shall not be liable to pay such rent over again to the transferee.
The lessor, the transferee and the lessee may determine what proportion of the premium or rent reserved by the lease is payable in respect of the part so transferred, and, in case they disagree, such determination may be made by any court having jurisdiction to entertain a suit for the possession of the property leased.