diff --git a/extensions/typescript-language-features/src/languageFeatures/copyPaste.ts b/extensions/typescript-language-features/src/languageFeatures/copyPaste.ts index 83a7bb38639cc..3e2e61a8a52c3 100644 --- a/extensions/typescript-language-features/src/languageFeatures/copyPaste.ts +++ b/extensions/typescript-language-features/src/languageFeatures/copyPaste.ts @@ -106,7 +106,7 @@ class DocumentPasteProvider implements vscode.DocumentPasteEditProvider { pasteLocations: ranges.map(typeConverters.Range.toTextSpan), copiedFrom }, token)); - if (response.type !== 'response' || !response.body || token.isCancellationRequested) { + if (response.type !== 'response' || !response.body?.edits.length || token.isCancellationRequested) { return; }