Skip to content

Commit

Permalink
fix: merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BRAVO68WEB committed Jan 22, 2024
1 parent bb6dbbe commit ef9bb4b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 25 deletions.
1 change: 1 addition & 0 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@graphql-codegen/typescript-operations": "^4.0.1",
"@hono/node-server": "^1.3.2",
"@upstash/redis": "^1.28.1",
"axios": "^1.6.2",
"dotenv": "^16.3.1",
"eslint": "^8.53.0",
"graphql-request": "^6.1.0",
Expand Down
6 changes: 2 additions & 4 deletions packages/api/services/challenges.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,10 +404,8 @@ export class ChallengeService {
for (const machine of challengeCollection) {
if(machine.depends_on) {
const depends_on_machine = challengeCollection.find(challenge => challenge.id === machine.depends_on);
if(depends_on_machine) {
if(depends_on_machine.challenges?.length !== depends_on_machine.total_challenges) {
challengeCollection.splice(challengeCollection.indexOf(machine), 1);
}
if(depends_on_machine && depends_on_machine.challenges?.length !== depends_on_machine.total_challenges) {
challengeCollection.splice(challengeCollection.indexOf(machine), 1);
}
}
}
Expand Down
45 changes: 24 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef9bb4b

Please sign in to comment.