Use CancellationToken.None instead of creating a new CTS (#153162)

This commit is contained in:
Matt Bierner 2022-06-24 15:04:21 -07:00 committed by GitHub
parent 6b4b361319
commit 6ee7176751
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1513,11 +1513,11 @@ export class CustomTreeViewDragAndDrop implements ITreeDragAndDrop<ITreeItem> {
const additionalDataTransfer = await this.treeViewsDragAndDropService.removeDragOperationTransfer(willDropUuid);
if (additionalDataTransfer) {
for (const item of additionalDataTransfer.entries()) {
outDataTransfer.append(item[0], item[1]);
for (const [type, item] of additionalDataTransfer.entries()) {
outDataTransfer.append(type, item);
}
}
return dndController.handleDrop(outDataTransfer, targetNode, new CancellationTokenSource().token, willDropUuid, treeSourceInfo?.id, treeSourceInfo?.itemHandles);
return dndController.handleDrop(outDataTransfer, targetNode, CancellationToken.None, willDropUuid, treeSourceInfo?.id, treeSourceInfo?.itemHandles);
}
onDragEnd(originalEvent: DragEvent): void {