chore(hammerspoon/app_toggle): minor lint warning fix

This commit is contained in:
2025-07-07 10:16:46 +01:00
parent 9315ca98bb
commit 525fe77e62

View File

@@ -131,7 +131,12 @@ function obj:toggle(apps)
return return
end end
if mostRecentApp == hs.application.frontmostApplication() then if not mostRecentApp then
mostRecentApp = runningApps[1]
end
local frontMostApp = hs.application.frontmostApplication()
if frontMostApp and mostRecentApp == frontMostApp then
return mostRecentApp:hide() return mostRecentApp:hide()
end end