From 89a1b45b6099d5229a29777a97f3a5b258c6485a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=A4der?= Date: Thu, 19 Jan 2023 10:24:24 +0100 Subject: [PATCH] Minor PR comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Mäder --- packages/core/src/browser/shell/application-shell.ts | 2 +- packages/filesystem/src/browser/file-tree/file-tree-widget.tsx | 2 +- packages/plugin-ext/src/plugin/tree/tree-views.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/browser/shell/application-shell.ts b/packages/core/src/browser/shell/application-shell.ts index ff29ef1ef241e..839dafff0f253 100644 --- a/packages/core/src/browser/shell/application-shell.ts +++ b/packages/core/src/browser/shell/application-shell.ts @@ -521,7 +521,7 @@ export class ApplicationShell extends Widget { uris.forEach(openUri); } else if (event.dataTransfer.files?.length > 0) { // the files were dragged from the outside the workspace - Array.from(event.dataTransfer.files).forEach(async file => { + Array.from(event.dataTransfer.files).forEach(file => { if (file.path) { const fileUri = URI.fromComponents({ scheme: 'file', diff --git a/packages/filesystem/src/browser/file-tree/file-tree-widget.tsx b/packages/filesystem/src/browser/file-tree/file-tree-widget.tsx index 2833ad411549a..2b371e9942737 100644 --- a/packages/filesystem/src/browser/file-tree/file-tree-widget.tsx +++ b/packages/filesystem/src/browser/file-tree/file-tree-widget.tsx @@ -128,7 +128,7 @@ export class FileTreeWidget extends CompressedTreeWidget { selectedNodes = [node]; } this.setSelectedTreeNodesAsData(event.dataTransfer, node, selectedNodes); - const uris = selectedNodes.filter(n => FileStatNode.is(n)).map(n => (n as FileStatNode).fileStat.resource); + const uris = selectedNodes.filter(FileStatNode.is).map(n => n.fileStat.resource); if (uris.length > 0) { ApplicationShell.setDraggedEditorUris(event.dataTransfer, uris); } diff --git a/packages/plugin-ext/src/plugin/tree/tree-views.ts b/packages/plugin-ext/src/plugin/tree/tree-views.ts index 92ff1737839aa..72163f35f9258 100644 --- a/packages/plugin-ext/src/plugin/tree/tree-views.ts +++ b/packages/plugin-ext/src/plugin/tree/tree-views.ts @@ -196,7 +196,7 @@ class TreeViewExtImpl implements Disposable { private readonly nodes = new Map>(); private pendingRefresh = Promise.resolve(); - private localDataTransfer: DataTransfer = new DataTransfer(); + private localDataTransfer = new DataTransfer(); private readonly toDispose = new DisposableCollection( Disposable.create(() => this.clearAll()),