House of Lords passes amendment to help prevent no-deal Brexit