fix count
This commit is contained in:
parent
4fdd626f0a
commit
457f5abf6c
|
@ -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') {
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue