Skip to content

Commit 5c933a8

Browse files
committed
refactor: replace non-null assertion with explicit throw in renderView
1 parent 7852f5b commit 5c933a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/webviews/chat/chatPanelProvider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ export class ChatPanelProvider
6565
}
6666

6767
private renderView(): void {
68-
const webview = this.view!.webview;
68+
if (!this.view) {
69+
throw new Error("renderView called before resolveWebviewView");
70+
}
71+
const webview = this.view.webview;
6972

7073
if (!this.agentId) {
7174
webview.html = this.getNoAgentHtml();

0 commit comments

Comments
 (0)