Skip to content

Commit

Permalink
Fix JS error if asset tab is hidden (#1693)
Browse files Browse the repository at this point in the history
- add check for null pointer if no asset is drag'n dropped
  • Loading branch information
bpauli authored Jul 22, 2021
1 parent a5c65ec commit 076973a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
smartCropRenditionsDropDown = $dynamicMediaGroup.find(smartCropRenditionDropDownSelector).get(0);
}

if ($cqFileUpload.length) {
if ($cqFileUpload.length && $cqFileUpload.data("cqFileuploadTemporaryfilepath")) {
imagePath = $cqFileUpload.data("cqFileuploadTemporaryfilepath").slice(0, $cqFileUpload.data("cqFileuploadTemporaryfilepath").lastIndexOf("/"));
retrieveInstanceInfo(imagePath);
$cqFileUpload.on("assetselected", function(e) {
Expand Down

0 comments on commit 076973a

Please sign in to comment.