Skip to content

Commit e0721f0

Browse files
committed
refactor: 강제 옵셔널 언래핑 제거
1 parent 8db2db2 commit e0721f0

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

WidgetShared/WidgetDeepLink.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@ enum WidgetDeepLink {
1212
static let todayTodoHost = "today"
1313
static let heatmapHost = "profile"
1414

15-
static var todayTodoURL: URL {
15+
static var todayTodoURL: URL? {
1616
url(host: todayTodoHost)
1717
}
1818

19-
static var heatmapURL: URL {
19+
static var heatmapURL: URL? {
2020
url(host: heatmapHost)
2121
}
2222

23-
private static func url(host: String) -> URL {
24-
URL(string: "\(scheme)://\(host)")!
23+
private static func url(host: String) -> URL? {
24+
var urlComponents = URLComponents()
25+
urlComponents.scheme = scheme
26+
urlComponents.host = host
27+
return urlComponents.url
2528
}
2629
}

0 commit comments

Comments
 (0)