Handle empty edits for TS paste (#222109)

Should use default paste in this case. Talking with TS if this should be handled differently from the server but worth adding the workaround for now
This commit is contained in:
Matt Bierner
2024-07-18 12:34:03 -07:00
committed by GitHub
parent 4e9bc6223b
commit febad5e489

View File

@@ -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;
}