1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

Conform more code to strict null checking (#10153)

* Conform more code to strict null checking

* Conform more code to strict null checking

* Iterate

* Iterate
This commit is contained in:
Michael Telatynski
2023-02-15 13:36:22 +00:00
committed by GitHub
parent a4ff959aa1
commit 145a5a8a8d
89 changed files with 520 additions and 551 deletions

View File

@ -383,7 +383,7 @@ describe("JitsiCall", () => {
await waitFor(
() =>
expect(
room.currentState.getStateEvents(JitsiCall.MEMBER_EVENT_TYPE, alice.userId).getContent(),
room.currentState.getStateEvents(JitsiCall.MEMBER_EVENT_TYPE, alice.userId)?.getContent(),
).toEqual({
devices: [client.getDeviceId()],
expires_ts: now1 + call.STUCK_DEVICE_TIMEOUT_MS,
@ -396,7 +396,7 @@ describe("JitsiCall", () => {
await waitFor(
() =>
expect(
room.currentState.getStateEvents(JitsiCall.MEMBER_EVENT_TYPE, alice.userId).getContent(),
room.currentState.getStateEvents(JitsiCall.MEMBER_EVENT_TYPE, alice.userId)?.getContent(),
).toEqual({
devices: [],
expires_ts: now2 + call.STUCK_DEVICE_TIMEOUT_MS,
@ -495,7 +495,7 @@ describe("JitsiCall", () => {
});
const expectDevices = (devices: IMyDevice[]) =>
expect(
room.currentState.getStateEvents(JitsiCall.MEMBER_EVENT_TYPE, alice.userId).getContent(),
room.currentState.getStateEvents(JitsiCall.MEMBER_EVENT_TYPE, alice.userId)?.getContent(),
).toEqual({
expires_ts: expect.any(Number),
devices: devices.map((d) => d.device_id),