diff --git a/components/cards/LazyBookCard.vue b/components/cards/LazyBookCard.vue index 5d4090ca..ffd9302f 100644 --- a/components/cards/LazyBookCard.vue +++ b/components/cards/LazyBookCard.vue @@ -526,9 +526,9 @@ export default { this.imageReady = true if (this.$refs.cover && this.bookCoverSrc !== this.placeholderUrl) { - var { naturalWidth, naturalHeight } = this.$refs.cover - var aspectRatio = naturalHeight / naturalWidth - var arDiff = Math.abs(aspectRatio - this.bookCoverAspectRatio) + const { naturalWidth, naturalHeight } = this.$refs.cover + const aspectRatio = naturalHeight / naturalWidth + const arDiff = Math.abs(aspectRatio - this.bookCoverAspectRatio) // If image aspect ratio is <= 1.45 or >= 1.75 then use cover bg, otherwise stretch to fit if (arDiff > 0.15) { diff --git a/components/cards/LazyListBookCard.vue b/components/cards/LazyListBookCard.vue index 192930df..851c89fe 100644 --- a/components/cards/LazyListBookCard.vue +++ b/components/cards/LazyListBookCard.vue @@ -1,18 +1,18 @@