File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1850,10 +1850,15 @@ ${contents}
18501850 const commentThread = isThread ? comment : comment . parent ;
18511851 const firstComment = isThread ? comment . comments [ 0 ] : comment ;
18521852 commentThread . collapsibleState = vscode . CommentThreadCollapsibleState . Collapsed ;
1853- const commentBody = firstComment instanceof GHPRComment ? firstComment . rawComment . body
1854- : ( firstComment . body instanceof vscode . MarkdownString ? firstComment . body . value : firstComment . body ) ;
1855-
1856- const filePath = firstComment instanceof GHPRComment ? firstComment . rawComment . path : undefined ;
1853+ let commentBody : string ;
1854+ let filePath : string | undefined ;
1855+ if ( firstComment instanceof GHPRComment ) {
1856+ commentBody = firstComment . rawComment . body ;
1857+ filePath = firstComment . rawComment . path ;
1858+ } else {
1859+ commentBody = firstComment . body instanceof vscode . MarkdownString ? firstComment . body . value : firstComment . body ;
1860+ filePath = undefined ;
1861+ }
18571862 const range = commentThread . range ;
18581863 let message : string ;
18591864 if ( filePath && range ) {
You can’t perform that action at this time.
0 commit comments