@sensiblestats/widget-react 0.48.1 → 0.48.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1498,14 +1498,15 @@ function writeSchedule(operatorId, localDate, payload, nowMs) {
|
|
|
1498
1498
|
}
|
|
1499
1499
|
|
|
1500
1500
|
// src/dueSet.ts
|
|
1501
|
-
var
|
|
1501
|
+
var TERMINAL_PHASES = /* @__PURE__ */ new Set(["fullTime", "postponed"]);
|
|
1502
1502
|
function dueMatchIds(groups, states, nowMs) {
|
|
1503
1503
|
const due = /* @__PURE__ */ new Set();
|
|
1504
1504
|
for (const group of groups) {
|
|
1505
1505
|
for (const match of group.matches) {
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
if (
|
|
1506
|
+
if (nowMs - match.kickoffUnix * 1e3 < 0) continue;
|
|
1507
|
+
const phase = states[match.matchId]?.phase;
|
|
1508
|
+
if (phase !== void 0 && TERMINAL_PHASES.has(phase)) continue;
|
|
1509
|
+
due.add(match.matchId);
|
|
1509
1510
|
}
|
|
1510
1511
|
}
|
|
1511
1512
|
return [...due];
|