Skip to content

Commit

Permalink
Fixes #20 : Split error on search name
Browse files Browse the repository at this point in the history
  • Loading branch information
gclement committed May 29, 2018
1 parent 1ad53b1 commit 0025b3a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/overwatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ let OverwatchProvider = function () {
if (overallOnly)
return false;
});

//// Seeking heroe datas
_.each(heroesMap, (map) => {
stats[map.name] = {};
Expand Down Expand Up @@ -303,7 +303,7 @@ let OverwatchProvider = function () {

//// Sanitize for new UI version
username = username.replace("-", "#");

var options = {
uri: getSearchUrl(username, lang, true),
headers: {
Expand All @@ -314,10 +314,8 @@ let OverwatchProvider = function () {

return rp(options).then((datas) => {
_.each(datas, (player) => {

var i = player.careerLink.split('/');
player.platform = i[2];
player.region = i[3];
//// Region is not longer provided in the result
player.region = "";
player.tier = (player.level - player.level % 100) / 100;
player.level = player.level % 100;
});
Expand Down

0 comments on commit 0025b3a

Please sign in to comment.