diff --git a/Mac/MainWindow/Sidebar/SidebarViewController.swift b/Mac/MainWindow/Sidebar/SidebarViewController.swift index 99b33cb90..26077cae8 100644 --- a/Mac/MainWindow/Sidebar/SidebarViewController.swift +++ b/Mac/MainWindow/Sidebar/SidebarViewController.swift @@ -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 }