Skip to content

Commit 5884aa4

Browse files
authored
Fix error message: "Cannot read properties of undefined (reading 'chatDynamicVariableModel')" (microsoft#199876)
Fix microsoft#199818
1 parent f840784 commit 5884aa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ export class ChatWidget extends Disposable implements IChatWidget {
403403

404404
this._register(this.inputPart.onDidLoadInputState(state => {
405405
this.contribs.forEach(c => {
406-
if (c.setInputState && state[c.id]) {
406+
if (c.setInputState && typeof state === 'object' && state?.[c.id]) {
407407
c.setInputState(state[c.id]);
408408
}
409409
});

0 commit comments

Comments
 (0)