Skip to content

Commit

Permalink
style: use ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
zdimension committed Aug 12, 2024
1 parent a9e0a97 commit 3312b1d
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@
if (index === -1) {
index = 0;
}
if (to === 'right') {
index = (index + 2) % orientations.length;
} else {
index = (index - 2 + orientations.length) % orientations.length;
}
index = (to === 'right' ? index + 2 : index - 2 + orientations.length) % orientations.length;
const newOrientation = orientations[index] as ExifOrientation;
try {
await updateAsset({ id: asset.id, updateAssetDto: { orientation: newOrientation } });
Expand Down

0 comments on commit 3312b1d

Please sign in to comment.