Skip to content

Commit

Permalink
fix: override_by_profiles should be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Trap committed Aug 7, 2024
1 parent b4f5189 commit 24e939f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export type OverrideByProfiles = ByProfileId<{
export type Config = {
enabled: boolean;
debug?: boolean;
override_by_profiles: OverrideByProfiles;
override_by_profiles?: OverrideByProfiles;
bypass_keep_found_in_raid_tweak?: boolean;
initial_offraid_position: string;
reset_offraid_position_on_player_die: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/path-to-tarkov-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ export class PathToTarkovController {
const profile: Profile = this.saveServer.getProfile(sessionId);
const profileTemplateId = profile.info.edition;

const overrideByProfiles = this.config.override_by_profiles[profileTemplateId] ?? {};
const overrideByProfiles = this.config.override_by_profiles?.[profileTemplateId] ?? {};

return overrideByProfiles.initial_offraid_position ?? this.config.initial_offraid_position;
};
Expand Down

0 comments on commit 24e939f

Please sign in to comment.