mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 02:36:19 +00:00
- Replaced explicit null/undefined/empty string checks with truthy/falsy conditions
- Improved code readability and efficiency
This commit is contained in:
@ -44,8 +44,8 @@ export class TagModelService {
|
||||
);
|
||||
}
|
||||
|
||||
const tagEntitiesToCreate = tags.filter((tagDto) => tagDto.uuid === null);
|
||||
const tagEntitiesToUpdate = tags.filter((tagDto) => tagDto.uuid !== null);
|
||||
const tagEntitiesToCreate = tags.filter((tagDto) => !tagDto.uuid);
|
||||
const tagEntitiesToUpdate = tags.filter((tagDto) => !!tagDto.uuid);
|
||||
|
||||
try {
|
||||
const createdTags = await this.bulkSaveTags(
|
||||
|
@ -33,7 +33,7 @@ export class TagService {
|
||||
this.ensureNoDuplicateTags(combinedTags);
|
||||
|
||||
const tagEntitiesToCreate = tags.filter((tagDto) => !tagDto.uuid);
|
||||
const tagEntitiesToUpdate = tags.filter((tagDto) => tagDto.uuid !== null);
|
||||
const tagEntitiesToUpdate = tags.filter((tagDto) => !!tagDto.uuid);
|
||||
|
||||
try {
|
||||
const createdTags = await this.bulkSaveTags(
|
||||
|
Reference in New Issue
Block a user