Log: Avoid error if hash has non-existing id.
The error was only visible in browser console. It wasn't very
informative so better to avoid it altogether. Might be even better to
report it nicely somehow.
@@ -222,7 +222,10 @@ window.testdata = function () {
var type = id[0];
var index = parseInt(id.substring(1)) - 1;
var item = selectFrom(current, type, index);
+ if (item)
result.push(item.id);
+ else // Invalid id. Should this be reported somewhere?
+ ids = [];
loadItems(ids, item, result, callback);
});
}
