mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-18 06:35:20 +02:00
Add diagnostic for common sentry errors
This commit is contained in:
@@ -59,7 +59,7 @@ iD.actions.Circularize = function(wayId, projection, count) {
|
||||
};
|
||||
|
||||
action.disabled = function(graph) {
|
||||
if (!graph.entity(wayId).isClosed())
|
||||
if (!graph.entity(wayId, true).isClosed())
|
||||
return 'not_closed';
|
||||
};
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ iD.actions.Orthogonalize = function(wayId, projection) {
|
||||
};
|
||||
|
||||
action.disabled = function(graph) {
|
||||
if (!graph.entity(wayId).isClosed())
|
||||
if (!graph.entity(wayId, true).isClosed())
|
||||
return 'not_closed';
|
||||
};
|
||||
|
||||
|
||||
+6
-2
@@ -31,8 +31,12 @@ iD.Graph = function(other, mutable) {
|
||||
};
|
||||
|
||||
iD.Graph.prototype = {
|
||||
entity: function(id) {
|
||||
return this.entities[id];
|
||||
entity: function(id, log) {
|
||||
var entity = this.entities[id];
|
||||
if (!entity && log && typeof Raven !== 'undefined') {
|
||||
Raven.captureMessage('entity not found', {tags: {id: id, entity: entity, base: this.base().entities[id]}});
|
||||
}
|
||||
return entity;
|
||||
},
|
||||
|
||||
transient: function(entity, key, fn) {
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ window.iD = function () {
|
||||
};
|
||||
|
||||
context.geometry = function(id) {
|
||||
return context.entity(id).geometry(history.graph());
|
||||
return context.entity(id, true).geometry(history.graph());
|
||||
};
|
||||
|
||||
/* Modes */
|
||||
|
||||
Reference in New Issue
Block a user