Add explict check for prototype inheritance of entities Chrome bug

(see #3973)
This commit is contained in:
Bryan Housel
2017-06-08 13:13:46 -04:00
parent b75cebb740
commit 9cdf0cdd66
+6
View File
@@ -34,6 +34,12 @@ coreGraph.prototype = {
entity: function(id) {
var entity = this.entities[id];
//https://github.com/openstreetmap/iD/issues/3973#issuecomment-307052376
if (!entity) {
entity = this.entities.__proto__[id];
}
if (!entity) {
throw new Error('entity ' + id + ' not found');
}