Conform more of the codebase to strictNullChecks
(#10358
* Conform more of the codebase to `strictNullChecks` * Fix types * Iterate * Iterate
This commit is contained in:
parent
41d88ad6ae
commit
503df62191
76 changed files with 323 additions and 327 deletions
|
@ -69,14 +69,14 @@ export default class SettingsFlag extends React.Component<IProps, IState> {
|
|||
private save = async (val?: boolean): Promise<void> => {
|
||||
await SettingsStore.setValue(
|
||||
this.props.name,
|
||||
this.props.roomId,
|
||||
this.props.roomId ?? null,
|
||||
this.props.level,
|
||||
val !== undefined ? val : this.state.value,
|
||||
);
|
||||
};
|
||||
|
||||
public render(): React.ReactNode {
|
||||
const canChange = SettingsStore.canSetValue(this.props.name, this.props.roomId, this.props.level);
|
||||
const canChange = SettingsStore.canSetValue(this.props.name, this.props.roomId ?? null, this.props.level);
|
||||
|
||||
if (!canChange && this.props.hideIfCannotSet) return null;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue