mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00: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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user