Skip to content

Commit b011383

Browse files
committed
style(mac): use conditional expression
1 parent f796ff0 commit b011383

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

apps/macos/Sources/OpenClaw/LaunchAgentManager.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ enum LaunchAgentManager {
2626
if enabled {
2727
let persist = writePlist ?? { self.writePlist(bundlePath: $0) }
2828
persist(bundlePath)
29-
let alreadyLoaded: Bool
30-
if let loaded {
31-
alreadyLoaded = loaded
29+
let alreadyLoaded = if let loaded {
30+
loaded
3231
} else {
33-
alreadyLoaded = await self.isLoaded()
32+
await self.isLoaded()
3433
}
3534
// Startup hydrates the toggle from launchd. Reinstalling the active job here
3635
// would boot out the app that is still responsible for bootstrapping it again.

0 commit comments

Comments
 (0)