diff --git a/src/github/issueOverview.ts b/src/github/issueOverview.ts index 750b9130d7..dda8788249 100644 --- a/src/github/issueOverview.ts +++ b/src/github/issueOverview.ts @@ -354,7 +354,9 @@ export class IssueOverviewPanel extends W const isNewItem = !this._item || (this._item.number !== identity.number); if (isNewItem || !this._panel.webview.html) { this._panel.webview.html = this.getHtmlForWebview(); - this._postMessage({ command: 'pr.clear' }); + if (this._item) { + this._postMessage({ command: 'pr.clear' }); + } } // If no model provided, resolve it from the identity