diff --git a/Sources/TableDirector.swift b/Sources/TableDirector.swift index 633eeb6..33846c0 100644 --- a/Sources/TableDirector.swift +++ b/Sources/TableDirector.swift @@ -65,7 +65,7 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate { public convenience init(tableView: UITableView, scrollDelegate: UIScrollViewDelegate? = nil, shouldUseAutomaticCellRegistration: Bool = true, shouldUsePrototypeCellHeightCalculation: Bool = false) { - let heightCalculator = shouldUsePrototypeCellHeightCalculation ? TablePrototypeCellHeightCalculator(tableView: tableView) : nil + let heightCalculator: TablePrototypeCellHeightCalculator? = shouldUsePrototypeCellHeightCalculation ? TablePrototypeCellHeightCalculator(tableView: tableView) : nil self.init(tableView: tableView, scrollDelegate: scrollDelegate, shouldUseAutomaticCellRegistration: shouldUseAutomaticCellRegistration, cellHeightCalculator: heightCalculator) }