@xcpcio/core 0.50.2 → 0.50.3

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/dist/index.cjs CHANGED
@@ -1244,8 +1244,8 @@ function createTeam(teamJSON) {
1244
1244
  t.name = teamJSON.name ?? teamJSON.team_name ?? "";
1245
1245
  t.organization = teamJSON.organization ?? "";
1246
1246
  t.badge = teamJSON.badge;
1247
- t.group = teamJSON.group ?? [];
1248
- t.tag = teamJSON.group ?? [];
1247
+ t.group = ___default.cloneDeep(teamJSON.group ?? []);
1248
+ t.tag = ___default.cloneDeep(teamJSON.tag ?? []);
1249
1249
  t.coach = teamJSON.coach;
1250
1250
  t.members = teamJSON.members;
1251
1251
  if (Boolean(teamJSON.official) === true) {
package/dist/index.mjs CHANGED
@@ -1211,8 +1211,8 @@ function createTeam(teamJSON) {
1211
1211
  t.name = teamJSON.name ?? teamJSON.team_name ?? "";
1212
1212
  t.organization = teamJSON.organization ?? "";
1213
1213
  t.badge = teamJSON.badge;
1214
- t.group = teamJSON.group ?? [];
1215
- t.tag = teamJSON.group ?? [];
1214
+ t.group = _.cloneDeep(teamJSON.group ?? []);
1215
+ t.tag = _.cloneDeep(teamJSON.tag ?? []);
1216
1216
  t.coach = teamJSON.coach;
1217
1217
  t.members = teamJSON.members;
1218
1218
  if (Boolean(teamJSON.official) === true) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcpcio/core",
3
- "version": "0.50.2",
3
+ "version": "0.50.3",
4
4
  "description": "XCPCIO Core",
5
5
  "author": "Dup4 <lyuzhi.pan@gmail.com>",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "papaparse": "^5.4.1",
50
50
  "string-width": "^6.1.0",
51
51
  "xlsx-js-style": "^1.2.0",
52
- "@xcpcio/types": "0.50.2"
52
+ "@xcpcio/types": "0.50.3"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@babel/types": "^7.22.4",
package/src/team.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import _ from "lodash";
2
+
1
3
  import type { Team as ITeam, Teams as ITeams, Image } from "@xcpcio/types";
2
4
 
3
5
  import type { Problem, TeamProblemStatistics } from "./problem";
@@ -284,8 +286,8 @@ export function createTeam(teamJSON: ITeam): Team {
284
286
  t.organization = teamJSON.organization ?? "";
285
287
  t.badge = teamJSON.badge;
286
288
 
287
- t.group = teamJSON.group ?? [];
288
- t.tag = teamJSON.group ?? [];
289
+ t.group = _.cloneDeep(teamJSON.group ?? []);
290
+ t.tag = _.cloneDeep(teamJSON.tag ?? []);
289
291
 
290
292
  t.coach = teamJSON.coach;
291
293
  t.members = teamJSON.members;