this.content.scrollTo dies when switching segments and the screen still moves


I’m using Segment on 1 page, and also using this.content.scrollTo() to “saved” (scroll to) the old place when the user switches between segments: Here’s some of my code. This breaks down (testing on iOS) if the old segment screen was still moving and you click to switch to the new segment. I think it’s something to do with this.content but I’m not sure what exactly.

switchSegment(oldPosition) {
    this.content ? this.content.scrollTo(0, oldPosition, 300) : null;