A ray of light through the pole of a lens goes undeviated only in the case of thin lenses.
The ray of light passing through the pole finds the surface on both the sides of the lens, i.e. where it enters from and where it leaves parallel to each other. Light that passes through a block of glass with parallel surfaces is not deviated; the ray of light that emerges is only shifted parallel to the original ray.
For a thin lens this parallel shift can be ignored as it is almost negligible. In the case of thick lenses, the parallel shift can be substantial and we cannot say that the ray of light passing through the pole is undeviated.