Skip to content

Commit

Permalink
FIX: Fragments groundings (#106)
Browse files Browse the repository at this point in the history
This fixes the refactoring of groundings, introduced with commit 39acf27
  • Loading branch information
christophe-lejeune committed Nov 2, 2021
1 parent b156198 commit b68f9ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/tasklist/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
Expand Down

0 comments on commit b68f9ff

Please sign in to comment.