Skip to content

Commit 970e0c7

Browse files
committed
chore: apply suggestion
1 parent c8a4859 commit 970e0c7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/app/src/components/panel/base/PanelBaseBody.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ const isFolderCreationInProgress = computed(() => context.actionInProgress.value
1717
1818
async function onFileDrop(event: DragEvent) {
1919
if (event.dataTransfer?.files) {
20-
if (context.feature.value === StudioFeature.Media) {
21-
await context.itemActionHandler[StudioItemActionId.UploadMedia]({
22-
directory: tree.value.currentItem.value.fsPath,
23-
files: Array.from(event.dataTransfer.files),
24-
})
20+
if (context.feature.value !== StudioFeature.Media) {
21+
return
2522
}
23+
24+
await context.itemActionHandler[StudioItemActionId.UploadMedia]({
25+
directory: tree.value.currentItem.value.fsPath,
26+
files: Array.from(event.dataTransfer.files),
27+
})
2628
}
2729
}
2830
</script>

0 commit comments

Comments
 (0)