Skip to content

Commit 5c1f3cd

Browse files
committed
refactor: use if let for cell configurable
1 parent b81f7c7 commit 5c1f3cd

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

WordPress/Classes/ViewRelated/Blog/Blog Dashboard/ViewModel/BlogDashboardViewModel.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ class BlogDashboardViewModel {
3131

3232
let cellType = identifier.id.cell
3333
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: cellType.defaultReuseID, for: indexPath)
34-
(cell as? BlogDashboardCardConfigurable)?.configure(blog: blog, viewController: viewController, dataModel: identifier.cellViewModel)
34+
35+
if let cellConfigurable = cell as? BlogDashboardCardConfigurable {
36+
cellConfigurable.configure(blog: blog, viewController: viewController, dataModel: identifier.cellViewModel)
37+
}
38+
3539
return cell
3640

3741
}

0 commit comments

Comments
 (0)