make the array optional
All checks were successful
Build / build (pull_request) Successful in 1m18s
Build / build (push) Successful in 1m6s

This commit is contained in:
Sainan 2025-04-09 20:55:17 +02:00
parent 2187b1cae5
commit e361d7ee5c
3 changed files with 3 additions and 2 deletions

View File

@ -1414,7 +1414,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//https://warframe.fandom.com/wiki/Heist //https://warframe.fandom.com/wiki/Heist
//ProfitTaker(1-4) Example:"LocationTag": "EudicoHeists", "Jobs":Mission name //ProfitTaker(1-4) Example:"LocationTag": "EudicoHeists", "Jobs":Mission name
CompletedJobChains: [completedJobChainsSchema], CompletedJobChains: { type: [completedJobChainsSchema], default: undefined },
//Night Wave Challenge //Night Wave Challenge
SeasonChallengeHistory: [seasonChallengeHistorySchema], SeasonChallengeHistory: [seasonChallengeHistorySchema],

View File

@ -152,6 +152,7 @@ export const addMissionInventoryUpdates = async (
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
const [bounty, tier, hub, id, tag] = inventoryUpdates.RewardInfo.jobId.split("_"); const [bounty, tier, hub, id, tag] = inventoryUpdates.RewardInfo.jobId.split("_");
if (tag == "EudicoHeists") { if (tag == "EudicoHeists") {
inventory.CompletedJobChains ??= [];
let chain = inventory.CompletedJobChains.find(x => x.LocationTag == tag); let chain = inventory.CompletedJobChains.find(x => x.LocationTag == tag);
if (!chain) { if (!chain) {
chain = chain =

View File

@ -292,7 +292,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
RecentVendorPurchases?: IRecentVendorPurchaseClient[]; RecentVendorPurchases?: IRecentVendorPurchaseClient[];
NodeIntrosCompleted: string[]; NodeIntrosCompleted: string[];
GuildId?: IOid; GuildId?: IOid;
CompletedJobChains: ICompletedJobChain[]; CompletedJobChains?: ICompletedJobChain[];
SeasonChallengeHistory: ISeasonChallenge[]; SeasonChallengeHistory: ISeasonChallenge[];
EquippedInstrument?: string; EquippedInstrument?: string;
InvasionChainProgress: IInvasionChainProgress[]; InvasionChainProgress: IInvasionChainProgress[];