Improve typescript null checking in places (#10073 (#10073

* Improve typescript null checking in places

* Iterate

* Fix Timer.ts
This commit is contained in:
Michael Telatynski
2023-02-03 15:27:47 +00:00
committed by GitHub
parent 97506cbcdb
commit 9743852380
43 changed files with 155 additions and 154 deletions

View File

@@ -72,7 +72,7 @@ export interface IMediaObject {
* @throws Throws if the given content cannot be packaged into a prepared media object.
*/
export function prepEventContentAsMedia(content: Partial<IMediaEventContent>): IPreparedMedia {
let thumbnail: IMediaObject = null;
let thumbnail: IMediaObject | undefined;
if (content?.info?.thumbnail_url) {
thumbnail = {
mxc: content.info.thumbnail_url,