Artificial intelligent assistant

$\nabla u=0~ a.e.\Rightarrow u=\text{constant}~ a.e. $ on Riemannian manifold Let $M$ be a Riemannian manifold and $\Omega\subset M$ be a connected open set. Is it true that for $u\in W^{1, 2}(\Omega)$ $$\nabla u=0~ a.e.\Rightarrow u=\text{constant}~ a.e.?$$ I know that this true if $M=\mathbb{R}^{n}$ by mollification, but does this also hold in this general setting? Thanks in advance!

It seems to me obviously true: from the standard arguments in Euclidean space you have that $u$ is constant a.e. on the connected components of the intersection of $\Omega$ with any chart. That constant must be the same on any pair of overlapping chart-components, and hence, on any pair of chart-components (suppose otherwise; then pick a point on each of the disagreeing components, draw a path through $\Omega$ between the points, and use compactness of the path.)

My only hesitation is that I don't see where geodesic completeness is needed anywhere in the argument.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 137e9634b022ba689d1ce4591c5a42e6