diff --git a/packages/view/src/App.tsx b/packages/view/src/App.tsx index 099e1f2c..4b552652 100644 --- a/packages/view/src/App.tsx +++ b/packages/view/src/App.tsx @@ -37,8 +37,10 @@ const App = () => { useEffect(() => { const handleMessage = (event: MessageEvent) => { const message = event.data; - setOwner(message.data.owner); - setRepo(message.data.repo); + if (message.data) { + setOwner(message.data.owner); + setRepo(message.data.repo); + } }; window.addEventListener("message", handleMessage); diff --git a/packages/vscode/src/webview-loader.ts b/packages/vscode/src/webview-loader.ts index cb86b6bc..ed8fc08e 100644 --- a/packages/vscode/src/webview-loader.ts +++ b/packages/vscode/src/webview-loader.ts @@ -147,6 +147,7 @@ export default class WebviewLoader implements vscode.Disposable { const gitLog = await getGitLog(this.gitPath, this.getCurrentWorkspacePath()); const gitConfig = await getGitConfig(this.gitPath, this.getCurrentWorkspacePath(), "origin"); const { owner, repo } = getRepo(gitConfig); + this.setGlobalOwnerAndRepo(owner, repo); const engine = new AnalysisEngine({ isDebugMode: true, gitLog,