summaryrefslogtreecommitdiff
path: root/worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'worker.js')
-rw-r--r--worker.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/worker.js b/worker.js
index 78f7f37..5a7b4cf 100644
--- a/worker.js
+++ b/worker.js
@@ -223,6 +223,10 @@ function flatten(obj) {
// when player objects end up in the same batch
const duplicate = player_records_direct.find(
(pr) => pr.api_id == player.api_id);
+ if (duplicate) {
+ console.error("duplicate disappeared! please investigate, ignoring for now…");
+ return;
+ }
if (duplicate.created_at < player.created_at) {
// replace by newer one as below
player_records_direct.splice(