- // Scroll to the highlighted thread
- setTimeout(() => this.commentHighlightBlock.nativeElement.scrollIntoView(), 0)
- }
- },
+ // Scroll to the highlighted thread
+ setTimeout(() => this.commentHighlightBlock.nativeElement.scrollIntoView(), 0)
+ }
+ },
+
+ error: err => {
+ // We may try to fetch highlighted thread of another video, skip the error if it is the case
+ // We'll retry the request on video Input() change
+ const errorBody = err.body as PeerTubeProblemDocument
+ if (highlightThread && errorBody?.code === ServerErrorCode.COMMENT_NOT_ASSOCIATED_TO_VIDEO) return