Add check to ensure osm service is available before calling isDataLoaded

This commit is contained in:
Quincy Morgan
2019-11-22 16:08:41 -05:00
parent 62865db740
commit b62162b191
+3 -1
View File
@@ -43,8 +43,10 @@ export function validationMissingTag(context) {
var validation = function checkMissingTag(entity, graph) {
var osm = context.connection();
// we can't know if the node is a vertex if the tile is undownloaded
if ((entity.type === 'node' && !context.connection().isDataLoaded(entity.loc)) ||
if ((entity.type === 'node' && osm && !osm.isDataLoaded(entity.loc)) ||
// allow untagged nodes that are part of ways
entity.geometry(graph) === 'vertex' ||
// allow untagged entities that are part of relations