Merge branch 'bugfix/CXTDT-579049' into 'release/20_0_3'
Digital PCT265 defect CXTDT-579049: Index out of bounds crash fixes. ### Summary Array indexing safety for mid property updates. ### JIRA Ticket https://onejira.verizon.com/browse/CXTDT-579049 See merge request https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui/-/merge_requests/1138
This commit is contained in:
commit
3092804f7c
@ -108,8 +108,7 @@ extension TabsListItemModel: AddMolecules {
|
|||||||
public func moleculesToAdd() -> AddMolecules.AddParameters? {
|
public func moleculesToAdd() -> AddMolecules.AddParameters? {
|
||||||
guard addedMolecules == nil else { return nil }
|
guard addedMolecules == nil else { return nil }
|
||||||
let index = tabs.selectedIndex
|
let index = tabs.selectedIndex
|
||||||
guard molecules.count >= index else { return nil }
|
guard let addedMolecules = molecules[safe: index] else { return nil }
|
||||||
let addedMolecules = molecules[index]
|
|
||||||
self.addedMolecules = addedMolecules
|
self.addedMolecules = addedMolecules
|
||||||
return (addedMolecules, .below)
|
return (addedMolecules, .below)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -361,7 +361,7 @@ open class Carousel: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func trackSwipeActionAnalyticsforIndex(_ index : Int){
|
func trackSwipeActionAnalyticsforIndex(_ index : Int){
|
||||||
guard let itemModel = molecules?[index],
|
guard let itemModel = molecules?[safe:index],
|
||||||
let viewControllerObject = delegateObject?.moleculeDelegate as? MVMCoreViewControllerProtocol else { return }
|
let viewControllerObject = delegateObject?.moleculeDelegate as? MVMCoreViewControllerProtocol else { return }
|
||||||
MVMCoreUILoggingHandler.shared()?.defaultLogAction(forController: viewControllerObject, actionInformation: itemModel.toJSON(), additionalData: nil)
|
MVMCoreUILoggingHandler.shared()?.defaultLogAction(forController: viewControllerObject, actionInformation: itemModel.toJSON(), additionalData: nil)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user