Skip to content
This repository has been archived by the owner on Nov 9, 2019. It is now read-only.

Commit

Permalink
fix minor bug
Browse files Browse the repository at this point in the history
Runalyze.reloadPlugin(1) did not work, if a statistics plugin with id
starting with 1, e.g. id=11, was shown.
  • Loading branch information
laufhannes committed Oct 10, 2015
1 parent c6c610d commit d262903
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/scripts.js
Expand Up @@ -6604,7 +6604,7 @@ Runalyze.Statistics = (function($, Parent){
};

self.shows = function(id) {
return (currentUrl.lastIndexOf( options.urlStat + id.toString(), 0 ) === 0);
return (currentUrl == options.urlStat + id.toString()) || (currentUrl.lastIndexOf( options.urlStat + id.toString() + '&', 0 ) === 0);
};

self.currentId = function() {
Expand Down
2 changes: 1 addition & 1 deletion build/scripts.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/runalyze.lib.statistics.js
Expand Up @@ -82,7 +82,7 @@ Runalyze.Statistics = (function($, Parent){
};

self.shows = function(id) {
return (currentUrl.lastIndexOf( options.urlStat + id.toString(), 0 ) === 0);
return (currentUrl == options.urlStat + id.toString()) || (currentUrl.lastIndexOf( options.urlStat + id.toString() + '&', 0 ) === 0);
};

self.currentId = function() {
Expand Down

0 comments on commit d262903

Please sign in to comment.