Skip to content

Commit f5e7e46

Browse files
committed
Remove unused variables
1 parent c773ae5 commit f5e7e46

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/integrations/cover-image-downloader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ export default (): AstroIntegration => ({
1414
let url!: URL
1515
try {
1616
url = new URL(database.Cover.Url)
17-
} catch (err) {
18-
console.log('Invalid Cover image URL')
17+
} catch {
18+
console.log('Invalid Cover image URL: ', database.Cover?.Url)
1919
return Promise.resolve()
2020
}
2121

src/integrations/custom-icon-downloader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export default (): AstroIntegration => ({
1717
let url!: URL
1818
try {
1919
url = new URL(icon.Url)
20-
} catch (err) {
21-
console.log('Invalid Icon image URL')
20+
} catch {
21+
console.log('Invalid Icon image URL: ', icon?.Url)
2222
return Promise.resolve()
2323
}
2424

src/integrations/featured-image-downloader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export default (): AstroIntegration => ({
1616
let url!: URL
1717
try {
1818
url = new URL(post.FeaturedImage.Url)
19-
} catch (err) {
20-
console.log('Invalid FeaturedImage URL')
19+
} catch {
20+
console.log('Invalid FeaturedImage URL: ', post.FeaturedImage?.Url)
2121
return Promise.resolve()
2222
}
2323

src/layouts/Layout.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ if (database.Cover) {
3333
} else if (database.Cover.Type === 'file') {
3434
try {
3535
coverImageURL = filePath(new URL(database.Cover.Url))
36-
} catch (err) {
37-
console.log('Invalid DB cover image URL')
36+
} catch {
37+
console.log('Invalid DB cover image URL: ', database.Cover?.Url)
3838
}
3939
}
4040
}
@@ -43,8 +43,8 @@ let customIconURL: string
4343
if (database.Icon && database.Icon.Type === 'file') {
4444
try {
4545
customIconURL = filePath(new URL(database.Icon.Url))
46-
} catch (err) {
47-
console.log('Invalid DB custom icon URL')
46+
} catch {
47+
console.log('Invalid DB custom icon URL: ', database.Icon?.Url)
4848
}
4949
}
5050
---

src/pages/posts/[slug].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ await Promise.all(
7373
let url!: URL
7474
try {
7575
url = new URL((block.Image || block.File).File.Url)
76-
} catch (err) {
77-
console.log('Invalid file URL')
76+
} catch {
77+
console.log('Invalid file URL: ', (block.Image || block.File)?.File?.Url)
7878
return Promise.reject()
7979
}
8080
return Promise.resolve(url)

0 commit comments

Comments
 (0)