From 524bd2e75f92c7f5148f0e843398febf3917b476 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sat, 14 Apr 2012 12:42:59 +0200 Subject: [PATCH] Sharing: Don't get share icon for undefined filename --- apps/files_sharing/js/share.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index fc9e17c25c..42851b3505 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -2,8 +2,11 @@ $(document).ready(function() { var shared_status = {}; if (typeof FileActions !== 'undefined') { 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; + if (typeof filename == 'undefined') { + return false; + } var file = $('#dir').val()+'/'+filename; if(shared_status[file]) return shared_status[file].icon;