Commit f9313d66 authored by Sven Franck's avatar Sven Franck

localStorage: ALLDOCS replaced 404 with [] if no docs found

parent 750686ea
...@@ -348,10 +348,7 @@ jIO.addStorageType('local', function (spec, my) { ...@@ -348,10 +348,7 @@ jIO.addStorageType('local', function (spec, my) {
} }
} }
all_doc_response.total_rows = items; all_doc_response.total_rows = items;
if (items > 0) { that.success(all_doc_response);
that.success(all_doc_response);
return;
}
} else { } else {
// create complex query object from returned results // create complex query object from returned results
for (i in localStorage) { for (i in localStorage) {
...@@ -374,18 +371,8 @@ jIO.addStorageType('local', function (spec, my) { ...@@ -374,18 +371,8 @@ jIO.addStorageType('local', function (spec, my) {
}, },
query_object query_object
); );
if (items > 0) { that.success(query_response);
that.success(query_response);
return;
}
} }
that.error({
"status": 404,
"statusText": "Not Found",
"error": "not_found",
"message": "No documents found",
"reason": "No documents found"
});
}; };
return that; return that;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment