og-statistics 2.0.0 → 2.0.1
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/package.json +1 -1
- package/src/index.js +3 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -163,11 +163,11 @@ const filterGoals = (incidents, isHome) => {
|
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
function filterSubs(incidents, isHome) {
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
let teamIncidents = incidents.filter(s => s.isHome === isHome && s.incidentType === 'substitution');
|
|
167
|
+
let teamInjured = incidents.filter(s => s.isHome === isHome && s.incidentType === 'substitution' && s.injury === true);
|
|
168
168
|
|
|
169
169
|
return {
|
|
170
|
-
|
|
170
|
+
all: teamIncidents,
|
|
171
171
|
injured: teamInjured
|
|
172
172
|
}
|
|
173
173
|
}
|