Skip to content

Commit

Permalink
uploadPDBFile() return if no file selected
Browse files Browse the repository at this point in the history
Possible if file selected and then file dialog opened and cancel clicked
  • Loading branch information
danjasuw committed Apr 9, 2021
1 parent 9bd5ca4 commit 932afee
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ window.uploadPDBFile = function() {

// get file to upload
var fileToUpload = document.getElementById("pdb-file-field").files[ 0 ];

if ( ! fileToUpload ) {

return; // NO File Selected
}

var pdbUserDescription = $("#pdb-file-description").val();

Expand Down

0 comments on commit 932afee

Please sign in to comment.