mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 07:25:15 +02:00
Ignore entity not found errors in childNodes conflict check (closes #2736)
Entity not found is caused by subtle bugs elsewhere in the iD code and should not prevent users from saving their work because it can't be thoroughly conflict checked.
This commit is contained in:
+8
-2
@@ -12,8 +12,14 @@ iD.modes.Save = function(context) {
|
||||
return _.uniq(_.reduce(ids, function(result, id) {
|
||||
var e = graph.entity(id);
|
||||
if (e.type === 'way') {
|
||||
var cn = graph.childNodes(e);
|
||||
result.push.apply(result, _.pluck(_.filter(cn, 'version'), 'id'));
|
||||
try {
|
||||
var cn = graph.childNodes(e);
|
||||
result.push.apply(result, _.pluck(_.filter(cn, 'version'), 'id'));
|
||||
} catch(err) {
|
||||
/* eslint-disable no-console */
|
||||
if (typeof console !== 'undefined') console.error(err);
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}, _.clone(ids)));
|
||||
|
||||
Reference in New Issue
Block a user