fix
This commit is contained in:
parent
8f9622dca8
commit
23390b5998
@ -35,10 +35,10 @@ function inject_search(elem) {
|
|||||||
if(ajax.status == 200) {
|
if(ajax.status == 200) {
|
||||||
// good
|
// good
|
||||||
var result = JSON.parse(ajax.responseText);
|
var result = JSON.parse(ajax.responseText);
|
||||||
if (result.length == 0) {
|
if (result.length == 1) {
|
||||||
status.innerHTML = "no results";
|
status.innerHTML = "no results";
|
||||||
} else {
|
} else {
|
||||||
status.innerHTML = "found "+result.length+" results";
|
status.innerHTML = "found "+(result.length - 1)+" results";
|
||||||
for (var idx = 0 ; idx < result.length; idx++ ) {
|
for (var idx = 0 ; idx < result.length; idx++ ) {
|
||||||
inject_search_result(result[idx]);
|
inject_search_result(result[idx]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user