diff options
Diffstat (limited to 'wikipedia/presenters/domain_wiki_presenter.js')
-rw-r--r-- | wikipedia/presenters/domain_wiki_presenter.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/wikipedia/presenters/domain_wiki_presenter.js b/wikipedia/presenters/domain_wiki_presenter.js index 3e59a01..b348825 100644 --- a/wikipedia/presenters/domain_wiki_presenter.js +++ b/wikipedia/presenters/domain_wiki_presenter.js @@ -42,14 +42,15 @@ const DomainWikiPresenter = new Lang.Class({ Lang.bind(this, this._onArticleBackClicked)); this.initAppInfoFromJsonFile(app_filename); - this.initPageRankFromJsonFile(linked_articles_filename); + + if(linked_articles_filename !== '') + this.initPageRankFromJsonFile(linked_articles_filename); let firstLevel = this._model.getMainCategory().getSubcategories(); firstLevel.push(this._model.getMainCategory()); this._view.set_categories(firstLevel); - let linked_articles = this._model.getLinkedArticles(); - let to_show = linked_articles["app_articles"].concat(linked_articles["extra_linked_articles"]); + let to_show = this._model.getLinkedArticles(); this._view.set_showable_links(to_show); let app_name = _pathnameToAppName(app_filename); @@ -94,4 +95,4 @@ const DomainWikiPresenter = new Lang.Class({ _onArticleBackClicked: function(button) { this._view.show_category_page(); } -});
\ No newline at end of file +}); |