Skip to content

Commit 4d3c66a

Browse files
committed
Fix a few warnings
1 parent 831741b commit 4d3c66a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Sources/Navigator/CBZ/CBZNavigatorViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ open class CBZNavigatorViewController: UIViewController, VisualNavigator, Loggab
4040

4141
let publicationEndpoint: HTTPServerEndpoint?
4242
let uuidEndpoint = UUID().uuidString
43-
if let url = publication.baseURL {
43+
if publication.baseURL != nil {
4444
publicationEndpoint = nil
4545
} else {
4646
publicationEndpoint = uuidEndpoint
@@ -79,7 +79,7 @@ open class CBZNavigatorViewController: UIViewController, VisualNavigator, Loggab
7979
@available(*, deprecated, message: "See the 2.5.0 migration guide to migrate the HTTP server")
8080
public convenience init(publication: Publication, initialLocation: Locator? = nil) {
8181
precondition(!publication.isRestricted, "The provided publication is restricted. Check that any DRM was properly unlocked using a Content Protection.")
82-
guard let baseURL = publication.baseURL else {
82+
guard publication.baseURL != nil else {
8383
preconditionFailure("No base URL provided for the publication. Add it to the HTTP server.")
8484
}
8585

Sources/Navigator/EPUB/EPUBNavigatorViewModel.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ final class EPUBNavigatorViewModel: Loggable {
5050
) throws {
5151
let uuidEndpoint: HTTPServerEndpoint = UUID().uuidString
5252
let publicationEndpoint: HTTPServerEndpoint?
53-
if let url = publication.baseURL {
53+
if publication.baseURL != nil {
5454
publicationEndpoint = nil
5555
} else {
5656
publicationEndpoint = uuidEndpoint

Sources/Navigator/PDF/PDFNavigatorViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ open class PDFNavigatorViewController: UIViewController, VisualNavigator, Select
9090

9191
let uuidEndpoint: HTTPServerEndpoint = UUID().uuidString
9292
let publicationEndpoint: HTTPServerEndpoint?
93-
if let url = publication.baseURL {
93+
if publication.baseURL != nil {
9494
publicationEndpoint = nil
9595
} else {
9696
publicationEndpoint = uuidEndpoint

0 commit comments

Comments
 (0)