Conform more of the codebase to strictNullChecks
(#10602)
* Conform more of the codebase to `strictNullChecks` * Conform more of the codebase to `strictNullChecks` * Fix types
This commit is contained in:
parent
93858813a3
commit
daad630827
26 changed files with 79 additions and 49 deletions
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
import classNames from "classnames";
|
||||
import { IEventRelation } from "matrix-js-sdk/src/models/event";
|
||||
import { M_POLL_START } from "matrix-js-sdk/src/@types/polls";
|
||||
import React, { createContext, MouseEventHandler, ReactElement, ReactNode, RefObject, useContext, useRef } from "react";
|
||||
import React, { createContext, MouseEventHandler, ReactElement, ReactNode, useContext, useRef } from "react";
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
|
||||
|
@ -180,7 +180,7 @@ interface IUploadButtonProps {
|
|||
const UploadButtonContextProvider: React.FC<IUploadButtonProps> = ({ roomId, relation, children }) => {
|
||||
const cli = useContext(MatrixClientContext);
|
||||
const roomContext = useContext(RoomContext);
|
||||
const uploadInput = useRef() as RefObject<HTMLInputElement>;
|
||||
const uploadInput = useRef<HTMLInputElement>(null);
|
||||
|
||||
const onUploadClick = (): void => {
|
||||
if (cli?.isGuest()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue