From db71f8bf6865ddc715e13827e64390629f8c4cc0 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Sun, 20 Sep 2020 00:52:28 -0400 Subject: [PATCH] Execute oncreate scrubber update after loadPromise has completed This way, we ensure that the initial position (and data) of the scrubber is correct. Otherwise, we get blank dates / incorrect location. --- js/src/forum/components/PostStreamScrubber.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/forum/components/PostStreamScrubber.js b/js/src/forum/components/PostStreamScrubber.js index deb4cf2cf..93abaaecd 100644 --- a/js/src/forum/components/PostStreamScrubber.js +++ b/js/src/forum/components/PostStreamScrubber.js @@ -137,7 +137,7 @@ export default class PostStreamScrubber extends Component { setTimeout(() => this.scrollListener.start()); - this.updateScrubberValues({ animate: true, forceHeightChange: true }); + this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: true, forceHeightChange: true })); } onremove() {