Correction to Nature https://doi.org/10.1038/s41586-019-1175-6, published online 08 May 2019.

In Fig. 3e of this Letter, the labels “Br-Cl1” and “Br-Cl2” should read “Br-Br1” and “Br-Br2”, respectively. In the Methods section ‘Preparation of electrodes’, the phrase “anhydrous LiBr/LiCl was replaced by LiBr·H2O (99.95%; Sigma-Aldrich) and LiCl (99.95%; Sigma-Aldrich)” should read “anhydrous LiBr/LiCl was replaced by LiBr·H2O (99.95%; Sigma-Aldrich) and LiCl·H2O (99.95%; Sigma-Aldrich)”. These errors have been corrected online.