Commit 90e34512 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Jérome Perrin

results (no results) returned correctly for empty models

parent a17fe132
......@@ -42,9 +42,15 @@
throw error;
})
.push(function (sim_json) {
var document_list = JSON.parse(sim_json).result.result_list,
var document = JSON.parse(sim_json),
document_list = [],
result_list = [],
i;
if (document.result) {
if (document.result.result_list) {
document_list = document.result.result_list;
}
}
for (i = 0; i < document_list.length; i += 1) {
result_list.push(RSVP.all([
gadget.whoWantsToDisplayThisResult(gadget.props.jio_key, i),
......
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