Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit ec0e24f

Browse files
authored
Use URLComponents.url instead of Alamofire's asURL (#726)
2 parents fe8537f + c1d134d commit ec0e24f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

WordPressKit/Insights/StatsCommentsInsight.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private extension StatsTopCommentsAuthor {
8383

8484
if var components = URLComponents(string: avatar) {
8585
components.query = "d=mm&s=60" // to get a properly-sized avatar.
86-
url = try? components.asURL()
86+
url = components.url
8787
} else {
8888
url = nil
8989
}

WordPressKit/Insights/StatsDotComFollowersInsight.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ extension StatsFollower {
7979

8080
if var components = URLComponents(string: avatar) {
8181
components.query = "d=mm&s=60" // to get a properly-sized avatar.
82-
url = try? components.asURL()
82+
url = components.url
8383
} else {
8484
url = nil
8585
}

WordPressKit/Time Interval/StatsTopAuthorsTimeIntervalData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ extension StatsTopAuthor {
9191
let url: URL?
9292
if var components = URLComponents(string: avatar) {
9393
components.query = "d=mm&s=60"
94-
url = try? components.asURL()
94+
url = components.url
9595
} else {
9696
url = nil
9797
}

0 commit comments

Comments
 (0)