Skip to content

Commit

Permalink
chore: remove unneeded ternary operator
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Dietzler <[email protected]>
  • Loading branch information
sebbi08 and danieldietzler committed May 2, 2024
1 parent 6d454a9 commit c665ec2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/src/services/asset.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ export class AssetService {

for (const id of ids) {
const asset = await this.assetRepository.getById(id);
const oldCreatedAtDate = asset?.fileCreatedAt;
const oldDateTime = oldCreatedAtDate ? DateTime.fromJSDate(oldCreatedAtDate) : undefined;
const oldCreatedAtDate = asset?.fileCreatedAt && DateTime.fromJSDate(asset.fileCreatedAt);
let newDateTimeString = dateTimeOriginal;
if (dateTimeOriginal && keepTimeUnchanged && oldDateTime) {
let newDateTime = DateTime.fromISO(dateTimeOriginal);
Expand Down

0 comments on commit c665ec2

Please sign in to comment.