Browse Source

Fixes issue with loading PRs in the status bar

main
Eric Amodio 3 years ago
parent
commit
7ee3100d5e
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      src/statusbar/statusBarController.ts

+ 6
- 5
src/statusbar/statusBarController.ts View File

@ -140,7 +140,7 @@ export class StatusBarController implements Disposable {
}
@debug({ args: false })
private async updateBlame(editor: TextEditor, commit: GitBlameCommit, options?: { pr?: PullRequest | undefined }) {
private async updateBlame(editor: TextEditor, commit: GitBlameCommit, options?: { pr?: PullRequest | null }) {
const cfg = Container.config.statusBar;
if (!cfg.enabled || this._statusBarBlame == null || !isTextEditor(editor)) return;
@ -160,9 +160,10 @@ export class StatusBarController implements Disposable {
'pullRequestAgoOrDate',
'pullRequestDate',
'pullRequestState',
)
? options?.pr ?? this.getPullRequest(commit, { timeout: timeout })
: undefined,
) &&
options?.pr === undefined
? this.getPullRequest(commit, { timeout: timeout })
: options?.pr ?? undefined,
]);
if (pr != null) {
@ -247,6 +248,6 @@ export class StatusBarController implements Disposable {
Logger.debug(cc, `${GlyphChars.Dot} pull request query completed; refreshing...`);
void this.updateBlame(editor, commit, { pr: pr });
void this.updateBlame(editor, commit, { pr: pr ?? null });
}
}

Loading…
Cancel
Save