Skip to content

Commit

Permalink
Fix #437 (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanrishatum committed May 11, 2024
1 parent 7d90f3e commit b57da10
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/candle/challengeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export abstract class ChallengeRegistry {
): void {
const gameChallenges = this.groupContents[gameVersion]
challenge.inGroup = groupId
challenge.inLocation = location
this.challenges[gameVersion].set(challenge.Id, challenge)

if (!gameChallenges.has(location)) {
Expand Down Expand Up @@ -244,7 +245,7 @@ export abstract class ChallengeRegistry {
return (
this.challenges[gameVersion].delete(challengeId) &&
this.groupContents[gameVersion]
.get(challenge.ParentLocationId)!
.get(challenge.inLocation!)!
.get(challenge.inGroup!)!
.delete(challengeId)
)
Expand Down Expand Up @@ -1243,7 +1244,7 @@ export class ChallengeService extends ChallengeRegistry {

const groupData = this.getGroupByIdLoc(
groupId,
challenges[0].ParentLocationId,
challenges[0].inLocation!,
gameVersion,
)

Expand Down
10 changes: 10 additions & 0 deletions components/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1378,9 +1378,19 @@ export interface RegistryChallenge extends SavedChallenge {
/**
* Warning: this property is INTERNAL and should NOT BE SPECIFIED by API users.
*
* The parent challenge group this challenge belongs to.
*
* @internal
*/
inGroup?: string
/**
* Warning: this property is INTERNAL and should NOT BE SPECIFIED by API users.
*
* The location ID this challenge belongs to, may mismatch ParentLocationId field.
*
* @internal
*/
inLocation?: string
}

/**
Expand Down

0 comments on commit b57da10

Please sign in to comment.