Define the wedge sum of two pointed spaces $X$ and $Y$ as $$ X\vee Y := X\sqcup Y / \sim $$ where $\sim$ is the equivalence relation which identifies the base points of $X$ and $Y$. I have read in some lecture notes that the canonical map $$X\vee Y \to X\times Y $$ is a homoemorphism onto its image $X\times \{y_0\} \cup \{x_0\} \times Y$. However, I do not see why the inverse map $$ X\times \{y_0\} \cup \{x_0\} \times Y \to X\vee Y $$ is continuous. It is given by $$ (x,y_0) \mapsto [x], \quad (x_0,y) \mapsto [y], $$ so it restricts to continuous maps on $X\times \{y_0\}$ and $\{x_0\} \times Y$. If $X$ and $Y$ are $T_1$-spaces, then these subspaces would be closed and the map would be continuous on all of $X\times \{y_0\} \cup \{x_0\} \times Y$. But how do I proceed if $X$ or $Y$ is not a $T_1$-space?
Many thanks in advance!