Skip to content

Commit

Permalink
fix: ensure menu items are enabled before finding them
Browse files Browse the repository at this point in the history
  • Loading branch information
zenangst committed Jul 16, 2024
1 parent cf53e38 commit e5f8a13
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions App/Sources/Core/Runners/MenuBarCommandRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ final class MenuBarCommandRunner {

private func find(_ token: MenuBarCommand.Token, in items: [MenuBarItemAccessibilityElement]) -> MenuBarItemAccessibilityElement? {
items.first(where: { item in
guard item.isEnabled == true else { return false }

switch token {
case .menuItem(let title):
return item.title == title
Expand Down

0 comments on commit e5f8a13

Please sign in to comment.