Set the container properly for each feed in `selectedArticles`.
This commit is contained in:
parent
531e48a337
commit
a4d867c712
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue