Skip to content

Commit 9c7e762

Browse files
Copilotalexr00
andcommitted
Add null checks for currentUser and pullRequest.author to fix login error
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 842e95e commit 9c7e762

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/github/activityBarViewProvider.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,14 @@ export class PullRequestViewProvider extends WebviewViewBase implements vscode.W
212212
);
213213
}
214214

215+
if (!currentUser) {
216+
throw new Error('Unable to get current user');
217+
}
218+
219+
if (!pullRequest.author) {
220+
throw new Error('Pull request author is missing');
221+
}
222+
215223
if (!this._item.equals(pullRequestModel)) {
216224
return;
217225
}

0 commit comments

Comments
 (0)