From e3ec00bcdf8d08aacf721cbaf5090c4282921adb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 14 Sep 2021 14:35:33 +0100 Subject: [PATCH] Fix space create menu eating first character of name in private space creation --- src/components/views/spaces/SpaceCreateMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/spaces/SpaceCreateMenu.tsx b/src/components/views/spaces/SpaceCreateMenu.tsx index 2028e66625..c09b26e45f 100644 --- a/src/components/views/spaces/SpaceCreateMenu.tsx +++ b/src/components/views/spaces/SpaceCreateMenu.tsx @@ -177,7 +177,7 @@ export const SpaceCreateForm: React.FC = ({ const newName = ev.target.value; if (!alias || alias === `#${nameToLocalpart(name)}:${domain}`) { setAlias(`#${nameToLocalpart(newName)}:${domain}`); - aliasFieldRef.current.validate({ allowEmpty: true }); + aliasFieldRef.current?.validate({ allowEmpty: true }); } setName(newName); }}