diff --git a/src/vs/workbench/api/common/extHostWebview.ts b/src/vs/workbench/api/common/extHostWebview.ts index 2f48b4e01ea..3b717043577 100644 --- a/src/vs/workbench/api/common/extHostWebview.ts +++ b/src/vs/workbench/api/common/extHostWebview.ts @@ -449,18 +449,12 @@ export class ExtHostWebviews implements ExtHostWebviewsShape { $undoEdits(handle: WebviewPanelHandle, edits: string[]): void { const panel = this.getWebviewPanel(handle); - if (!panel) { - return; - } - panel._undoEdits(edits); + panel?._undoEdits(edits); } $redoEdits(handle: WebviewPanelHandle, edits: string[]): void { const panel = this.getWebviewPanel(handle); - if (!panel) { - return; - } - panel._redoEdits(edits); + panel?._redoEdits(edits); } async $onSave(handle: WebviewPanelHandle): Promise {