Skip to content

Commit

Permalink
Fix incremented follower-counter
Browse files Browse the repository at this point in the history
If the locale code includes '_', follower-count does not increase
  • Loading branch information
usingsky committed May 8, 2019
1 parent 00dbb49 commit c4bf4ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ckan/public-bs2/base/javascript/modules/followers-counter.js
Expand Up @@ -61,6 +61,8 @@ this.ckan.module('followers-counter', function($) {
var action = options.action;
var incrementedFollowers;

locale = locale ? locale.replace('_', '-') : locale;

if (action === 'follow') {
incrementedFollowers = (++this.options.num_followers).toLocaleString(locale);
} else if (action === 'unfollow') {
Expand Down
2 changes: 2 additions & 0 deletions ckan/public/base/javascript/modules/followers-counter.js
Expand Up @@ -61,6 +61,8 @@ this.ckan.module('followers-counter', function($) {
var action = options.action;
var incrementedFollowers;

locale = locale ? locale.replace('_', '-') : locale;

if (action === 'follow') {
incrementedFollowers = (++this.options.num_followers).toLocaleString(locale);
} else if (action === 'unfollow') {
Expand Down

0 comments on commit c4bf4ad

Please sign in to comment.