diff --git a/app/views/tasklist/map.js b/app/views/tasklist/map.js index 2f14b1f..d9a04aa 100644 --- a/app/views/tasklist/map.js +++ b/app/views/tasklist/map.js @@ -22,10 +22,11 @@ function(o) { } if (o.groundings && o.groundings.length < 1) emit([diary, user, 'G', o.history[0].date], {'id': o._id, '_id': null, 'name': o.name}); - if (o.groundings && o.groundings.length == 1) + if (o.groundings && o.groundings.length == 1) { var gid = o.groundings[0]; if (typeof gid._id === 'string') gid = gid._id; emit([diary, user, 'G', o.history[0].date], {'id': o._id, '_id': gid, 'name': o.name}); + } if (o.type == 'diagram' && o.groundings && o.groundings.length == 1) emit([diary, user, 'A', o.history[0].date], {'id': o._id, '_id': o._id, 'name': o.name}); }