From cce5efe6a9fa9380d81f6f2bae3451e3d8dcf7f0 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 30 Apr 2020 13:01:36 -0300 Subject: [PATCH] [FIX] Prevent crash when thread is not found (#2080) Co-authored-by: Diego Mello --- app/views/RoomView/List.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/RoomView/List.js b/app/views/RoomView/List.js index 5ca13644b..8860b8de7 100644 --- a/app/views/RoomView/List.js +++ b/app/views/RoomView/List.js @@ -96,7 +96,7 @@ class List extends React.Component { this.messagesSubscription = this.messagesObservable .subscribe((data) => { this.interaction = InteractionManager.runAfterInteractions(() => { - if (tmid) { + if (tmid && this.thread) { data = [this.thread, ...data]; } const messages = orderBy(data, ['ts'], ['desc']);