File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -322,7 +322,7 @@ export interface LatestUpdatesResponse {
322322 timelineItems : {
323323 nodes : ( {
324324 createdAt : string ;
325- } | LatestCommit | LatestReviewThread ) [ ] ;
325+ } | LatestCommit | LatestReviewThread | null ) [ ] ;
326326 }
327327 }
328328 }
Original file line number Diff line number Diff line change @@ -450,13 +450,13 @@ export class IssueModel<TItem extends Issue = Issue> extends Disposable {
450450 ...( data . repository . pullRequest . comments . nodes . map ( node => new Date ( node . updatedAt ) ) ) ,
451451 ...( data . repository . pullRequest . comments . nodes . flatMap ( node => node . reactions . nodes . map ( reaction => new Date ( reaction . createdAt ) ) ) ) ,
452452 ...( data . repository . pullRequest . timelineItems . nodes . map ( node => {
453- const latestCommit = node as Partial < LatestCommit > ;
454- if ( latestCommit . commit ?. committedDate ) {
453+ const latestCommit = node as ( Partial < LatestCommit > | null ) ;
454+ if ( latestCommit ? .commit ?. committedDate ) {
455455 return new Date ( latestCommit . commit . committedDate ) ;
456456 }
457- const latestReviewThread = node as Partial < LatestReviewThread > ;
458- if ( ( latestReviewThread . comments ?. nodes . length ?? 0 ) > 0 ) {
459- return new Date ( latestReviewThread . comments ! . nodes [ 0 ] . createdAt ) ;
457+ const latestReviewThread = node as ( Partial < LatestReviewThread > | null ) ;
458+ if ( ( latestReviewThread ? .comments ?. nodes . length ?? 0 ) > 0 ) {
459+ return new Date ( latestReviewThread ! . comments ! . nodes [ 0 ] . createdAt ) ;
460460 }
461461 return new Date ( ( node as { createdAt : string } ) . createdAt ) ;
462462 } ) )
You can’t perform that action at this time.
0 commit comments