mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 13:18:15 +02:00
Uncache the entity before starting the work
This fixes a situation where several entities in the queue are involved in a disconnected crossing, and the first one detects the disconnection, but a later one clears out that first detection from the cache. Now we clear caches one time before starting the validation work.
This commit is contained in:
@@ -670,9 +670,10 @@ export function coreValidator(context) {
|
||||
if (cache.queuedEntityIDs.has(entityID)) return null; // queued already
|
||||
cache.queuedEntityIDs.add(entityID);
|
||||
|
||||
// Clear caches for existing issues related to this entity
|
||||
cache.uncacheEntityID(entityID);
|
||||
|
||||
return () => {
|
||||
// Clear caches for existing issues related to this entity
|
||||
cache.uncacheEntityID(entityID);
|
||||
cache.queuedEntityIDs.delete(entityID);
|
||||
|
||||
const graph = cache.graph;
|
||||
|
||||
Reference in New Issue
Block a user