Skip to content

Commit

Permalink
Avoid duplicate CoTs on incoming
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Jun 13, 2024
1 parent 7b19de1 commit 34fb62b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/web/src/stores/cots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 34fb62b

Please sign in to comment.