From a4d867c71213baea9a7f3f6bda53e913a51602f3 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 17 Nov 2024 21:33:14 -0800 Subject: [PATCH] Set the container properly for each feed in `selectedArticles`. --- Mac/Scriptability/NSApplication+Scriptability.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mac/Scriptability/NSApplication+Scriptability.swift b/Mac/Scriptability/NSApplication+Scriptability.swift index 14ad11ecb..c49f92de3 100644 --- a/Mac/Scriptability/NSApplication+Scriptability.swift +++ b/Mac/Scriptability/NSApplication+Scriptability.swift @@ -42,9 +42,9 @@ extension NSApplication : ScriptingObjectContainer { func selectedArticles() -> NSArray { let articles = appDelegate.scriptingSelectedArticles let scriptableArticles:[ScriptableArticle] = articles.compactMap { article in - if let feed = article.feed { - let scriptableFeed = ScriptableFeed(feed, container:self) - return ScriptableArticle(article, container:scriptableFeed) + if let feed = article.feed, let account = feed.account { + let scriptableFeed = ScriptableFeed(feed, container: ScriptableAccount(account)) + return ScriptableArticle(article, container: scriptableFeed) } else { return nil }