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:
Bryan Housel
2021-08-27 17:24:45 -04:00
parent b94151396d
commit 113f079449
+3 -2
View File
@@ -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;