Skip to content

Commit

Permalink
Fix new editor tabs crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristalev committed Oct 9, 2022
1 parent fc22df6 commit 4880bd2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EditorTab: NSCollectionViewItem {
@IBOutlet private weak var titleLabel: NSTextField!
@IBOutlet private weak var backgroundView: NSView!
@IBOutlet private weak var tabIconView: NSImageView!
@IBOutlet private weak var separatorView: NSView!
@IBOutlet private weak var separatorView: NSView?

override var isSelected: Bool {
didSet {
Expand Down Expand Up @@ -54,7 +54,7 @@ class EditorTab: NSCollectionViewItem {

private func updateSelectionHighlighting() {
guard isViewLoaded else { return }
separatorView.isHidden = showAsHighlighted
separatorView?.isHidden = showAsHighlighted
view.layer?.backgroundColor = showAsHighlighted ? NSColor.selectedControlColor.cgColor : .clear
}

Expand Down

0 comments on commit 4880bd2

Please sign in to comment.