Conform more of the codebase to strict typescript (#10841)

This commit is contained in:
Michael Telatynski
2023-05-25 09:39:23 +01:00
committed by GitHub
parent af78a5a2f5
commit 277a3c0146
12 changed files with 89 additions and 60 deletions
+6 -2
View File
@@ -42,8 +42,12 @@ export class RoomScrollStateStore {
return this.scrollStateMap.get(roomId);
}
public setScrollState(roomId: string, scrollState: ScrollState): void {
this.scrollStateMap.set(roomId, scrollState);
public setScrollState(roomId: string, scrollState: ScrollState | null): void {
if (scrollState === null) {
this.scrollStateMap.delete(roomId);
} else {
this.scrollStateMap.set(roomId, scrollState);
}
}
}