Fix bug looking up accounts.

This commit is contained in:
Brent Simmons 2024-11-16 16:27:40 -08:00
parent ab651398cd
commit 1265351712

View File

@ -62,7 +62,7 @@ extension NSApplication : ScriptingObjectContainer {
@objc(valueInAccountsWithUniqueID:) @objc(valueInAccountsWithUniqueID:)
func valueInAccounts(withUniqueID id:String) -> ScriptableAccount? { func valueInAccounts(withUniqueID id:String) -> ScriptableAccount? {
let accounts = AccountManager.shared.activeAccounts let accounts = AccountManager.shared.accounts
guard let account = accounts.first(where:{$0.accountID == id}) else { return nil } guard let account = accounts.first(where:{$0.accountID == id}) else { return nil }
return ScriptableAccount(account) return ScriptableAccount(account)
} }