Skip to content

Commit d1a9ada

Browse files
authored
Fix ResourceProperties.mediaType encoding (#719)
1 parent ab5ff65 commit d1a9ada

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ All notable changes to this project will be documented in this file. Take a look
2626

2727
### Fixed
2828

29+
* Fixed casting of `ResourceProperties`'s `mediaType` (contributed by [@lbeus](https://github.com/readium/swift-toolkit/pull/719)).
30+
2931
#### Navigator
3032

3133
* The first resource of a fixed-layout EPUB is now displayed on its own by default, matching Apple Books behavior.

Sources/Shared/Toolkit/Data/Resource/ResourceProperties.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public extension ResourceProperties {
5555
}
5656
set {
5757
if let mediaType = newValue {
58-
properties[mediaTypeKey] = mediaType
58+
properties[mediaTypeKey] = mediaType.string
5959
} else {
6060
properties.removeValue(forKey: mediaTypeKey)
6161
}

0 commit comments

Comments
 (0)