1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Null-guard for event that do not have a thread

This commit is contained in:
Germain Souquet
2021-10-14 17:37:33 +01:00
parent 9ceeb2d220
commit efbc46937f

View File

@@ -439,7 +439,7 @@ export class MatrixEvent extends EventEmitter {
*/
public get isThreadRoot(): boolean {
const thread = this.getThread();
return thread.id === this.getId();
return thread?.id === this.getId();
}
public get parentEventId(): string {