Set the container properly for each feed in `selectedArticles`.

This commit is contained in:
Brent Simmons 2024-11-17 21:33:14 -08:00
parent 531e48a337
commit a4d867c712
1 changed files with 3 additions and 3 deletions

View File

@ -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
}