From c297ac01e9da77ac3baba5853b3e31c95de5f526 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Wed, 20 Aug 2025 17:28:52 +0200 Subject: [PATCH 1/2] fix(importer): accept loadouts without `GEAR` field New inventories don't have that field --- src/services/importService.ts | 2 +- src/types/saveLoadoutTypes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/importService.ts b/src/services/importService.ts index 3337a243..4b0685ab 100644 --- a/src/services/importService.ts +++ b/src/services/importService.ts @@ -444,7 +444,7 @@ export const importLoadOutPresets = (db: ILoadoutDatabase, client: ILoadOutPrese db.NORMAL_PVP = client.NORMAL_PVP.map(convertLoadOutConfig); db.LUNARO = client.LUNARO.map(convertLoadOutConfig); db.OPERATOR = client.OPERATOR.map(convertLoadOutConfig); - db.GEAR = client.GEAR.map(convertLoadOutConfig); + db.GEAR = client.GEAR ? client.GEAR.map(convertLoadOutConfig) : []; db.KDRIVE = client.KDRIVE.map(convertLoadOutConfig); db.DATAKNIFE = client.DATAKNIFE.map(convertLoadOutConfig); db.MECH = client.MECH.map(convertLoadOutConfig); diff --git a/src/types/saveLoadoutTypes.ts b/src/types/saveLoadoutTypes.ts index 9e8e5bf9..c3a146aa 100644 --- a/src/types/saveLoadoutTypes.ts +++ b/src/types/saveLoadoutTypes.ts @@ -96,7 +96,7 @@ export interface ILoadOutPresets { ARCHWING: ILoadoutConfigClient[]; SENTINEL: ILoadoutConfigClient[]; OPERATOR: ILoadoutConfigClient[]; - GEAR: ILoadoutConfigClient[]; + GEAR?: ILoadoutConfigClient[]; KDRIVE: ILoadoutConfigClient[]; DATAKNIFE: ILoadoutConfigClient[]; MECH: ILoadoutConfigClient[]; -- 2.47.2 From 1eff3e8df226654afb9ee34a666c4e402c7ce409 Mon Sep 17 00:00:00 2001 From: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Date: Thu, 21 Aug 2025 16:36:16 +0200 Subject: [PATCH 2/2] GEAR optional in database --- src/services/importService.ts | 2 +- src/types/saveLoadoutTypes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/importService.ts b/src/services/importService.ts index 4b0685ab..518dacf8 100644 --- a/src/services/importService.ts +++ b/src/services/importService.ts @@ -444,7 +444,7 @@ export const importLoadOutPresets = (db: ILoadoutDatabase, client: ILoadOutPrese db.NORMAL_PVP = client.NORMAL_PVP.map(convertLoadOutConfig); db.LUNARO = client.LUNARO.map(convertLoadOutConfig); db.OPERATOR = client.OPERATOR.map(convertLoadOutConfig); - db.GEAR = client.GEAR ? client.GEAR.map(convertLoadOutConfig) : []; + db.GEAR = client.GEAR?.map(convertLoadOutConfig); db.KDRIVE = client.KDRIVE.map(convertLoadOutConfig); db.DATAKNIFE = client.DATAKNIFE.map(convertLoadOutConfig); db.MECH = client.MECH.map(convertLoadOutConfig); diff --git a/src/types/saveLoadoutTypes.ts b/src/types/saveLoadoutTypes.ts index c3a146aa..33ff9708 100644 --- a/src/types/saveLoadoutTypes.ts +++ b/src/types/saveLoadoutTypes.ts @@ -79,7 +79,7 @@ export interface ILoadoutDatabase { NORMAL_PVP: ILoadoutConfigDatabase[]; LUNARO: ILoadoutConfigDatabase[]; OPERATOR: ILoadoutConfigDatabase[]; - GEAR: ILoadoutConfigDatabase[]; + GEAR?: ILoadoutConfigDatabase[]; KDRIVE: ILoadoutConfigDatabase[]; DATAKNIFE: ILoadoutConfigDatabase[]; MECH: ILoadoutConfigDatabase[]; -- 2.47.2