Sharing: Don't get share icon for undefined filename

This commit is contained in:
Bart Visscher 2012-04-14 12:42:59 +02:00
parent 7504ceb6f2
commit 524bd2e75f
1 changed files with 4 additions and 1 deletions

View File

@ -2,8 +2,11 @@ $(document).ready(function() {
var shared_status = {}; var shared_status = {};
if (typeof FileActions !== 'undefined') { if (typeof FileActions !== 'undefined') {
FileActions.register('all', 'Share', function(filename) { FileActions.register('all', 'Share', function(filename) {
if (scanFiles.scanning){return;}//workaround to prevent aditional http request block scanning feedback if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
var icon; var icon;
if (typeof filename == 'undefined') {
return false;
}
var file = $('#dir').val()+'/'+filename; var file = $('#dir').val()+'/'+filename;
if(shared_status[file]) if(shared_status[file])
return shared_status[file].icon; return shared_status[file].icon;