summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js')
-rw-r--r--core/js/oc-dialogs.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index d346b5231d1..a9f9426c488 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -841,9 +841,9 @@ var OCdialogs = {
filter = [filter];
}
self.filepicker.filesClient.getFolderContents(dir).then(function(status, files) {
- if (filter) {
+ if (filter && filter.length > 0) {
files = files.filter(function (file) {
- return filter == [] || file.type === 'dir' || filter.indexOf(file.mimetype) !== -1;
+ return file.type === 'dir' || filter.indexOf(file.mimetype) !== -1;
});
}
files = files.sort(function(a, b) {