From 34fb62b7f852a0522b01a5fa6ff3b3bb3c94dca6 Mon Sep 17 00:00:00 2001 From: ingalls Date: Thu, 13 Jun 2024 14:15:47 -0600 Subject: [PATCH] Avoid duplicate CoTs on incoming --- api/web/src/stores/cots.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/api/web/src/stores/cots.ts b/api/web/src/stores/cots.ts index 314c26ca1..dc7af505f 100644 --- a/api/web/src/stores/cots.ts +++ b/api/web/src/stores/cots.ts @@ -327,6 +327,8 @@ export const useCOTStore = defineStore('cots', { feat = this.style(feat); + console.error(feat.properties); + if (mission_guid) { let cots = this.subscriptions.get(mission_guid); if (!cots) { @@ -336,6 +338,16 @@ export const useCOTStore = defineStore('cots', { cots.set(String(feat.id), feat); } else { + let mission_cot = false; + for (const [key, value] of this.subscriptions) { + if (value.has(feat.id)) { + value.set(feat.id, feat); + mission_cot = true; + } + } + + if (mission_cot) return; + this.pending.set(String(feat.id), feat); if (feat.properties && feat.properties.archived) {