Skip to content

Commit

Permalink
Check if umbFileDropzone has queued items before showing ChooseMediaT…
Browse files Browse the repository at this point in the history
…ypeDialog

The ChooseMediaTypeDialog is shown even if there are no queue items, for example due file errors. 
Checking the queue lenght in _requestChooseMediaTypeDialog prevents showing the dialog unnecessary.
  • Loading branch information
inetzo authored and nul800sebastiaan committed Aug 31, 2021
1 parent 2ae28c1 commit d9135dd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ angular.module("umbraco.directives")

function _requestChooseMediaTypeDialog() {

if (scope.queue.length === 0) {
// if queue has no items so there is nothing to choose a type for
return false;
}

if (scope.acceptedMediatypes.length === 1) {
// if only one accepted type, then we wont ask to choose.
return false;
Expand Down

0 comments on commit d9135dd

Please sign in to comment.