mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Fix two potential exceptions and one lint warning
This commit is contained in:
@@ -314,7 +314,8 @@ export function coreValidator(context) {
|
||||
|
||||
// detect new issues and update caches
|
||||
entityIDsToCheck.forEach(function(entityID) {
|
||||
var entity = graph.entity(entityID);
|
||||
var entity = graph.hasEntity(entityID);
|
||||
if (!entity) return;
|
||||
var issues = validateEntity(entity);
|
||||
|
||||
issues.forEach(function(issue) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { utilDisplayLabel } from '../util';
|
||||
import { t } from '../util/locale';
|
||||
import { validationIssue, validationIssueFix } from '../core/validation';
|
||||
import { osmRoutableHighwayTagValues } from '../osm/tags';
|
||||
import { geoExtent, geoSphericalDistance } from '../geo';
|
||||
import { geoSphericalDistance } from '../geo';
|
||||
|
||||
|
||||
export function validationCloseNodes() {
|
||||
|
||||
@@ -23,10 +23,11 @@ export function validationDisconnectedWay() {
|
||||
var entityLabel = utilDisplayLabel(entity, context);
|
||||
var fixes = [];
|
||||
var entityID = entity.id;
|
||||
var firstID = entity.first();
|
||||
var lastID = entity.last();
|
||||
|
||||
if (entity.type === 'way' && !entity.isClosed()) {
|
||||
var firstID = entity.first();
|
||||
var lastID = entity.last();
|
||||
|
||||
var first = context.entity(firstID);
|
||||
if (first.tags.noexit !== 'yes') {
|
||||
fixes.push(new validationIssueFix({
|
||||
|
||||
Reference in New Issue
Block a user