mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-01-11 01:04:05 +01:00
Avoid force-unwrapping, which was causing a crash. Add an assertionFailure
so we can catch this issue in the act — we need to know why an item would not be a Node. Fix https://github.com/Ranchero-Software/NetNewsWire/issues/3824
This commit is contained in:
parent
489088ad74
commit
06910b1e58
@ -371,7 +371,10 @@ protocol SidebarDelegate: AnyObject {
|
||||
}
|
||||
|
||||
func outlineView(_ outlineView: NSOutlineView, isGroupItem item: Any) -> Bool {
|
||||
let node = item as! Node
|
||||
guard let node = item as? Node else {
|
||||
assertionFailure("Expected item to be a Node.")
|
||||
return false
|
||||
}
|
||||
return node.isGroupItem
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user