Standardize isDefined usage for metadata version assertions (#11829)
# Introduction `!value` is risky as `!falsy` would return `true`
This commit is contained in:
@ -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}`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user