Suppose that we are given a continuous function $f\colon [0,1]\to \mathbb{C}$. Let us define
$$h(x) = \frac{f(x)}{|f(x)|} $$
whenever $f(x)\neq 0$. Can we always extend $h$ to a continuous function $h\colon [0,1]\to \mathbb{C}$?
It seems so, however I am not sure how to proceed if $f$ has infinitely many zeros (for example when the zero set of $f$ looks like the Cantor set).
The continuous, complex-valued function $f(x) = x - \frac{1}{2}$ on $[0, 1]$ gives rise to an $h$ having no continuous extension.