Conform more of the codebase to strictNullChecks
(#10842)
This commit is contained in:
parent
5eea2c8b02
commit
82e32035fd
24 changed files with 126 additions and 93 deletions
|
@ -32,7 +32,7 @@ interface IProps {
|
|||
links: string[]; // the URLs to be previewed
|
||||
mxEvent: MatrixEvent; // the Event associated with the preview
|
||||
onCancelClick(): void; // called when the preview's cancel ('hide') button is clicked
|
||||
onHeightChanged(): void; // called when the preview's contents has loaded
|
||||
onHeightChanged?(): void; // called when the preview's contents has loaded
|
||||
}
|
||||
|
||||
const LinkPreviewGroup: React.FC<IProps> = ({ links, mxEvent, onCancelClick, onHeightChanged }) => {
|
||||
|
@ -49,7 +49,7 @@ const LinkPreviewGroup: React.FC<IProps> = ({ links, mxEvent, onCancelClick, onH
|
|||
);
|
||||
|
||||
useEffect(() => {
|
||||
onHeightChanged();
|
||||
onHeightChanged?.();
|
||||
}, [onHeightChanged, expanded, previews]);
|
||||
|
||||
const showPreviews = expanded ? previews : previews.slice(0, INITIAL_NUM_PREVIEWS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue