]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix js error
authorGeorg Ehrke <developer@georgehrke.com>
Wed, 7 Aug 2013 09:57:10 +0000 (11:57 +0200)
committerGeorg Ehrke <developer@georgehrke.com>
Wed, 7 Aug 2013 09:58:49 +0000 (11:58 +0200)
apps/files_sharing/js/public.js

index fbbe9b7f3cb4ae0da47c0dedc85293244ddd8dcf..8cac8bf1997f6757c2f1257a8f8f2d670932ea69 100644 (file)
@@ -16,7 +16,7 @@ $(document).ready(function() {
        if (typeof FileActions !== 'undefined') {
                var mimetype = $('#mimetype').val();
                // Show file preview if previewer is available, images are already handled by the template
-               if (mimetype.substr(0, mimetype.indexOf('/')) != 'image' && $('.publicpreview').length() !== 0) {
+               if (mimetype.substr(0, mimetype.indexOf('/')) != 'image' && $('.publicpreview').length === 0) {
                        // Trigger default action if not download TODO
                        var action = FileActions.getDefault(mimetype, 'file', OC.PERMISSION_READ);
                        if (typeof action === 'undefined') {