From f4f0ab3c189798a6a1d400742450571963de1278 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Mon, 11 Jul 2022 11:08:14 +0200 Subject: [PATCH] TypeError: Cannot read properties of null (reading 'uri') (#154775) Fixes #154764 --- src/vs/workbench/contrib/comments/browser/commentReply.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/comments/browser/commentReply.ts b/src/vs/workbench/contrib/comments/browser/commentReply.ts index 8fe2a07420ec6..68eda2e6e390b 100644 --- a/src/vs/workbench/contrib/comments/browser/commentReply.ts +++ b/src/vs/workbench/contrib/comments/browser/commentReply.ts @@ -218,8 +218,8 @@ export class CommentReply extends Disposable { this._commentThreadDisposables.push(this._commentThread.onDidChangeInput(input => { const thread = this._commentThread; - - if (thread.input && thread.input.uri !== commentEditor.getModel()!.uri) { + const model = commentEditor.getModel(); + if (thread.input && model && (thread.input.uri !== model.uri)) { return; } if (!input) {