Skip to content

Commit

Permalink
add missing return and remove unnecessary return
Browse files Browse the repository at this point in the history
  • Loading branch information
despairblue committed Nov 4, 2024
1 parent fbd0c75 commit 35dd728
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/cli/src/services/ownership.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ export class OwnershipService {
projectId,
);

if (cachedValue) this.userRepository.create(cachedValue);
if (cachedValue === null) return null;
if (cachedValue) return this.userRepository.create(cachedValue);

const ownerRel = await this.projectRelationRepository.getPersonalProjectOwners([projectId]);
const owner = ownerRel[0]?.user ?? null;
Expand Down

0 comments on commit 35dd728

Please sign in to comment.