diff --git a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/TabBarModel.swift b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/TabBarModel.swift index 95e07a34..3b62210c 100644 --- a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/TabBarModel.swift +++ b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/TabBarModel.swift @@ -52,7 +52,7 @@ open class TabBarModel: MoleculeModelProtocol { } } - open var style: NavigationItemStyle? + open var style: NavigationItemStyle? = .dark // Must be capped to 0...(tabs.count - 1) open var selectedTab: Int = 0 @@ -86,7 +86,9 @@ open class TabBarModel: MoleculeModelProtocol { if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedTab) { selectedTab = index } - style = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) + if let navStyle = try typeContainer.decodeIfPresent(NavigationItemStyle.self, forKey: .style) { + style = navStyle + } } open func encode(to encoder: Encoder) throws {