fix to error check

This commit is contained in:
Pfeil, Scott Robert 2020-01-24 09:35:38 -05:00
parent 6602ac505a
commit d7f955c991

View File

@ -54,7 +54,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
}
open override func shouldFinishProcessingLoad(_ loadObject: MVMCoreLoadObject, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject>) -> Bool {
let shouldFinish = super.shouldFinishProcessingLoad(loadObject, error: error)
guard super.shouldFinishProcessingLoad(loadObject, error: error) else { return false }
// This template requires atleast one of the three layers.
if templateModel?.header == nil,
templateModel?.molecules?.count ?? 0 == 0,
@ -63,7 +63,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
error.pointee = errorObject
return false
}
return shouldFinish
return true
}
open override func newDataBuildScreen() {