You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-05 15:22:09 +03:00
Conform more code to strictNullChecks (#10368
* Conform more code to `strictNullChecks` * Iterate
This commit is contained in:
committed by
GitHub
parent
05e3fb09d6
commit
8cb8cd4eb1
@@ -44,7 +44,7 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
|
||||
const spaceNameField = useRef<Field>();
|
||||
const [alias, setAlias] = useState("");
|
||||
const spaceAliasField = useRef<RoomAliasField>();
|
||||
const [avatar, setAvatar] = useState<File>(null);
|
||||
const [avatar, setAvatar] = useState<File | undefined>();
|
||||
const [topic, setTopic] = useState<string>("");
|
||||
|
||||
const spaceJoinRule = space.getJoinRule();
|
||||
@@ -56,7 +56,7 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
|
||||
|
||||
const onCreateSubspaceClick = async (e: ButtonEvent): Promise<void> => {
|
||||
e.preventDefault();
|
||||
if (busy) return;
|
||||
if (busy || !spaceNameField.current || !spaceAliasField.current) return;
|
||||
|
||||
setBusy(true);
|
||||
// require & validate the space name field
|
||||
@@ -83,7 +83,7 @@ const CreateSubspaceDialog: React.FC<IProps> = ({ space, onAddExistingSpaceClick
|
||||
}
|
||||
};
|
||||
|
||||
let joinRuleMicrocopy: JSX.Element;
|
||||
let joinRuleMicrocopy: JSX.Element | undefined;
|
||||
if (joinRule === JoinRule.Restricted) {
|
||||
joinRuleMicrocopy = (
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user