summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/index.js b/index.js
index 583d5ae..c0d0378 100644
--- a/index.js
+++ b/index.js
@@ -13,6 +13,10 @@ function fromObject(root) {
c.queries = _.isArray(c.queries) ? c.queries : [];
c.templates = _.isArray(c.templates) ? c.templates : [];
+ _.each(c.items, function(item) {
+ item.links = _.isArray(item.links) ? item.links : [];
+ });
+
// TODO: make un-enumerable
root.mapItemData = function(f) {
return _.map(this.collection.items, function(item) {