Standardize isDefined usage for metadata version assertions (#11829)

# Introduction
`!value` is risky as `!falsy` would return `true`
This commit is contained in:
Paul Rastoin
2025-05-02 11:07:12 +02:00
committed by GitHub
parent 9df4778954
commit 3e1b4ace37
5 changed files with 10 additions and 6 deletions

View File

@ -537,7 +537,7 @@ export class RelationMetadataService extends TypeOrmQueryService<RelationMetadat
const metadataVersion =
await this.workspaceCacheStorageService.getMetadataVersion(workspaceId);
if (!metadataVersion) {
if (!isDefined(metadataVersion)) {
throw new NotFoundException(
`Metadata version not found for workspace ${workspaceId}`,
);