diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-12-31 16:15:57 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-01-02 10:28:42 +0100 |
commit | 457f5abf6cc611064b30bdc0d70a8d42a73c9706 (patch) | |
tree | 951f9b6816c5282f2acb378f61653e05b636b433 | |
parent | 4fdd626f0a4b6667e3fd4c376399617df5866315 (diff) | |
download | nextcloud-server-457f5abf6cc611064b30bdc0d70a8d42a73c9706.tar.gz nextcloud-server-457f5abf6cc611064b30bdc0d70a8d42a73c9706.zip |
fix count
-rw-r--r-- | apps/files/js/filesummary.js | 2 | ||||
-rw-r--r-- | search/js/search.js | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/js/filesummary.js b/apps/files/js/filesummary.js index 46880272cdc..d69c5f1b53a 100644 --- a/apps/files/js/filesummary.js +++ b/apps/files/js/filesummary.js @@ -108,7 +108,7 @@ for (var i = 0; i < files.length; i++) { file = files[i]; - if (file.name.toLowerCase().indexOf(this.summary.filter) === -1) { + if (file.name && file.name.toLowerCase().indexOf(this.summary.filter) === -1) { continue; } if (file.type === 'dir' || file.mime === 'httpd/unix-directory') { diff --git a/search/js/search.js b/search/js/search.js index b19a420cee8..b090a4ec4a8 100644 --- a/search/js/search.js +++ b/search/js/search.js @@ -234,6 +234,9 @@ } else { // not showing result, decrease counter var count = $status.data('count') - 1; + if (count < 0) { + count = 0; + } $status.data('count', count) .text(t('search', '{count} search results in other places', {count:count}, count)); } |