diff --git a/src/Explorer/Notebook/NotebookManager.ts b/src/Explorer/Notebook/NotebookManager.ts index 85b888d5a..8afab432c 100644 --- a/src/Explorer/Notebook/NotebookManager.ts +++ b/src/Explorer/Notebook/NotebookManager.ts @@ -113,11 +113,14 @@ export default class NotebookManager { this.params.resourceTree.initializeGitHubRepos(pinnedRepos); this.params.resourceTree.triggerRender(); }); - this.junoClient.getPinnedRepos(this.gitHubOAuthService.getTokenObservable()()?.scope); + this.refreshPinnedRepos(); } public refreshPinnedRepos(): void { - this.junoClient.getPinnedRepos(this.gitHubOAuthService.getTokenObservable()()?.scope); + const token = this.gitHubOAuthService.getTokenObservable()(); + if (token) { + this.junoClient.getPinnedRepos(token.scope); + } } public async openPublishNotebookPane(