Is the following statement true? If so, can anyone provide a reference?

Let $X$ be a CAT(0) cubical complex, and let $Y$ be a connected subcomplex of $X$. Then the following are equivalent:

- $Y$ is convex in $X$.
- For every cube $C$ in $X$, the intersection $C\cap Y$ is a face of $C$.

Here the empty set is considered a face of every cube, and each cube is a face of itself.

Clearly (1) implies (2), and in all the examples I can think of (2) also implies (1).