Skip to content

Commit 3fc3e22

Browse files
authored
Merge pull request #194 from LukePrior/testing
fix some predictions not deleting
2 parents ea9080b + 49ca8e9 commit 3fc3e22

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/tracker.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,10 @@ function launchSitePredictions(times, station, properties, marker) {
770770
}
771771
if (count < maxCount) {
772772
if (((date - now) / 36e5) < 170) {
773-
dates.push(date.toISOString().split('.')[0]+"Z");
774-
count += 1;
773+
if (!dates.includes(date.toISOString().split('.')[0]+"Z")) {
774+
dates.push(date.toISOString().split('.')[0]+"Z");
775+
count += 1;
776+
}
775777
}
776778
}
777779
}

0 commit comments

Comments
 (0)