Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Fixed crash caused by resource.id set to nil. #228

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/EPUBCore/FRResources.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class FRResources: NSObject {
guard let id = id else { return nil }

for resource in resources.values {
if resource.id == id {
if let resourceID = resource.id, resourceID == id {
return resource
}
}
Expand All @@ -104,7 +104,7 @@ class FRResources: NSObject {
guard let id = id else { return false }

for resource in resources.values {
if resource.id == id {
if let resourceID = resource.id, resourceID == id {
return true
}
}
Expand Down