Skip to content

Commit

Permalink
Topviews: Fix display of page ranking when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
MusikAnimal committed Feb 2, 2017
1 parent 8560e74 commit 02bf8e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions javascripts/topviews/topviews.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ class TopViews extends Pv {

// add ranking to pageData and fetch matches
this.pageData.forEach((entry, index) => {
if (!this.excludes.includes(entry.article)) {
if (!this.excludes.includes(entry.article) && !this.autoExcludes.includes(entry.article)) {
count++;
if (new RegExp(query, 'i').test(entry.article)) {
entry.rank = count;
Expand All @@ -593,7 +593,7 @@ class TopViews extends Pv {
<td class='topview-entry--rank-wrapper'>
<span class='topview-entry--remove glyphicon glyphicon-remove' data-article-id=${item.index}
title='${$.i18n('topviews-remove-page')}' aria-hidden='true'></span>
<span class='topview-entry--rank'>${++count}</span>
<span class='topview-entry--rank'>${item.rank}</span>
</td>
<td>
<a class='topview-entry--label' href="${this.getPageURL(item.article)}" target="_blank">${item.article}</a>
Expand Down
Loading

0 comments on commit 02bf8e5

Please sign in to comment.