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 { func selectedArticles() -> NSArray {
let articles = appDelegate.scriptingSelectedArticles let articles = appDelegate.scriptingSelectedArticles
let scriptableArticles:[ScriptableArticle] = articles.compactMap { article in let scriptableArticles:[ScriptableArticle] = articles.compactMap { article in
if let feed = article.feed { if let feed = article.feed, let account = feed.account {
let scriptableFeed = ScriptableFeed(feed, container:self) let scriptableFeed = ScriptableFeed(feed, container: ScriptableAccount(account))
return ScriptableArticle(article, container:scriptableFeed) return ScriptableArticle(article, container: scriptableFeed)
} else { } else {
return nil return nil
} }