From 8c362bf7c762a249b0651ae7a20f511733a2bae4 Mon Sep 17 00:00:00 2001
From: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
Date: Fri, 10 Jul 2020 13:01:57 -0400
Subject: [PATCH] Don't save index twice in post stream post-load

---
 js/src/forum/components/PostStream.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/js/src/forum/components/PostStream.js b/js/src/forum/components/PostStream.js
index 931cd52ba..3dad39a34 100644
--- a/js/src/forum/components/PostStream.js
+++ b/js/src/forum/components/PostStream.js
@@ -327,9 +327,9 @@ export default class PostStream extends Component {
 
     return Promise.all([$container.promise(), this.state.loadPromise]).then(() => {
       this.updateScrubber();
-      this.state.index = $item.data('index');
+      const index = $item.data('index');
       m.redraw(true);
-      const scroll = this.state.index == 0 ? 0 : $(`.PostStream-item[data-index=${$item.data('index')}]`).offset().top - this.getMarginTop();
+      const scroll = index == 0 ? 0 : $(`.PostStream-item[data-index=${$item.data('index')}]`).offset().top - this.getMarginTop();
       $(window).scrollTop(scroll);
       this.calculatePosition();
       this.state.paused = false;