fix count

This commit is contained in:
Jörn Friedrich Dreyer 2014-12-31 16:15:57 +01:00
parent 4fdd626f0a
commit 457f5abf6c
2 changed files with 4 additions and 1 deletions

View File

@ -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') {

View File

@ -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));
}