Skip to content

Commit 18044c4

Browse files
authored
Merge pull request #855 from le-jeu/fix/machina-tracker-decayed
Fix: decayed messages are attributed to machina
2 parents 7c30c7e + 2eaf5ad commit 18044c4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

plugins/machina-tracker.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
// @name Machina tracker
22
// @author McBen
33
// @category Layer
4-
// @version 1.1.0
4+
// @version 1.1.1
55
// @description Show locations of Machina activities
66

77
/* exported setup, changelog --eslint */
88
/* global IITC, L */
99

1010
var changelog = [
11+
{
12+
version: '1.1.1',
13+
changes: ['Fix decayed messages attributed to Machina'],
14+
},
1115
{
1216
version: '1.1.0',
1317
changes: ['Using `IITC.utils.formatAgo` instead of the plugin own function'],
@@ -133,7 +137,7 @@ machinaTracker.processNewData = function (data) {
133137
data.result.forEach((json) => {
134138
if (json[1] >= limit) {
135139
var newEvent = machinaTracker.createEvent(json);
136-
if (newEvent.from && newEvent.to && [window.TEAM_MAC, window.TEAM_NONE].includes(window.teamStringToId(newEvent.team))) {
140+
if (newEvent.from && newEvent.to && newEvent.team && [window.TEAM_MAC, window.TEAM_NONE].includes(window.teamStringToId(newEvent.team))) {
137141
var prevEvent = machinaTracker.events.find((e) => e.from.latLng.equals(newEvent.from.latLng));
138142
if (!prevEvent) {
139143
machinaTracker.events.push(newEvent);

0 commit comments

Comments
 (0)