From b413c8a434312a74a07ac2ac8c93cdfc23e45791 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 25 Nov 2026 00:12:28 +0100 Subject: [PATCH] Focus Page in the DevTools menu uses if let The Focus Page button mapped over the active tab only for the side effect, which discards the mapped result and trips a Swift 6 warning. An if let says what it does and focuses the page the same way. Co-Authored-By: Claude Sonnet 5.5 --- Sources/Fast/DevHead.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Fast/DevHead.swift b/Sources/Fast/DevHead.swift index c178a59a..e696aec7 100644 --- a/Sources/Fast/DevHead.swift +++ b/Sources/Fast/DevHead.swift @@ -169,7 +169,7 @@ struct DevHead: View { } Divider() } - Button("Focus Page") { browser.active.map { $0.page.window?.makeFirstResponder($0.page) } } + Button("Focus Page") { if let tab = browser.active { tab.page.window?.makeFirstResponder(tab.page) } } if let chrome = browser.chromiumDevFront?.chromiumDev { // Chrome's DevTools have these of their own, and no use for // WebKit's More Tools and Device Settings.