Sharing: Don't get share icon for undefined filename
This commit is contained in:
parent
7504ceb6f2
commit
524bd2e75f
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue