You've already forked matrix-js-sdk
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:
@@ -439,7 +439,7 @@ export class MatrixEvent extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
public get isThreadRoot(): boolean {
|
public get isThreadRoot(): boolean {
|
||||||
const thread = this.getThread();
|
const thread = this.getThread();
|
||||||
return thread.id === this.getId();
|
return thread?.id === this.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public get parentEventId(): string {
|
public get parentEventId(): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user