Digital PCT265 defect CXTDT-531317: Give the default page type for those that send an empty string.
This commit is contained in:
parent
18aca32b43
commit
41548b8434
@ -83,6 +83,9 @@ import Foundation
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
if let defaultPageType = Self.defaultPageType() {
|
||||
pageType = try typeContainer.decodeIfPresent(String.self, forKey: .pageType) ?? defaultPageType
|
||||
if pageType.isEmpty {
|
||||
pageType = defaultPageType
|
||||
}
|
||||
} else {
|
||||
pageType = try typeContainer.decode(String.self, forKey: .pageType)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user