We have studied the coherent intercavity coupling of the evanescent fields of two microdisk terahertz quantum-cascade lasers. The electrically controllable optical coupling of the single-mode operating lasers has been observed for cavity spacings up to 30 mum. The strongest coupled photonic molecule with 2 mum intercavity spacing allows to conditionally switch the optical emission by the electrical modulation of only one microdisk. The lasing threshold characteristics demonstrate the linear dependence of the gain of a quantum-cascade laser on the applied electric field.