XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

fix: don't provide [object Object] as a loadout item id (#4239)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4239 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

2f73552c
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

2 个文件 +2 -2
Modified src/models/inventoryModels/loadoutModel.ts +1 -1
@@ -23,7 +23,7 @@ EquipmentSelectionSchema.set("toJSON", {
23 23 const db = ret as IEquipmentSelectionDatabase;
24 24 const client = ret as IEquipmentSelectionClient;
25 25
26 if (db.ItemId) {
26 if (db.ItemId && !("$oid" in db.ItemId)) {
27 27 client.ItemId = toOid(db.ItemId);
28 28 }
29 29 }
Modified src/types/equipmentTypes.ts +1 -1
@@ -17,7 +17,7 @@ export interface IEquipmentSelectionClient {
17 17 }
18 18
19 19 export interface IEquipmentSelectionDatabase extends Omit<IEquipmentSelectionClient, "ItemId"> {
20 ItemId?: Types.ObjectId;
20 ItemId?: Types.ObjectId | IOid; // should be Types.ObjectId but might not be :(
21 21 }
22 22
23 23 export const eEquipmentFeatures = {