Fix js error when navigating away from volumeEditMaterialsForm