Skip to content

Commit

Permalink
Fix autoStatMods/includeRuntimeStatBenefits
Browse files Browse the repository at this point in the history
  • Loading branch information
bhollis committed Oct 21, 2024
1 parent bc2e0eb commit aafe289
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions api/stately/loadouts-queries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ it('can roundtrip loadout parameters', () => {
const loParams: LoadoutParameters = {
...defaultLoadoutParameters,
exoticArmorHash: 3045642045,
autoStatMods: false,
};

const statelyLoParams = client.create(
Expand Down
2 changes: 0 additions & 2 deletions api/stately/loadouts-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ export function convertLoadoutParametersFromStately(
modsByBucket: _.isEmpty(modsByBucket)
? undefined
: listToMap('bucketHash', 'modHashes', modsByBucket),
autoStatMods: true,
includeRuntimeStatBenefits: true,
artifactUnlocks: artifactUnlocks ? stripTypeName(artifactUnlocks) : undefined,
inGameIdentifiers: inGameIdentifiers ? stripTypeName(inGameIdentifiers) : undefined,
};
Expand Down
2 changes: 1 addition & 1 deletion api/stately/stately-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function convertEnum(
*/
export function stripDefaults<T extends Record<string, unknown>>(data: T): Partial<T> {
return Object.entries(data).reduce<Record<string, unknown>>((result, [key, value]) => {
if (value) {
if (value || value === false) {
result[key] = value;
}
return result;
Expand Down

0 comments on commit aafe289

Please sign in to comment.