Skip to content

Commit

Permalink
Bugfix for starting new thread from Ref with sources
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmalloy committed Nov 22, 2024
1 parent 6b5fd07 commit e6ce1a3
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,13 @@ export class CommentReplyComponent implements AfterViewInit {
]), ...removeTags));
const sources = [this.to.url];
if (hasTag('plugin/comment', tags) || hasTag('plugin/thread', tags)) {
sources.push(this.to.sources?.[1] || this.to.sources?.[0] || this.to.url)
if (hasTag('plugin/comment', this.to) || hasTag('plugin/thread', this.to)) {
// Parent may be the top
sources.push(this.to.sources?.[1] || this.to.url);
} else {
// Parent is the top
sources.push(this.to.url);
}
}
const ref: Ref = {
url,
Expand Down

0 comments on commit e6ce1a3

Please sign in to comment.