Skip to content

Commit

Permalink
small bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ezraroi committed Jul 5, 2024
1 parent d7c9950 commit cf0287b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions Mundialito/Client/src/General/MundialitoUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ angular.module('mundialitoApp').factory('MundialitoUtils', [ 'Constants', functi
return ((now - instance.LoadTime.getTime()) > Constants.REFRESH_TIME);
},
shortName : (name) => {
let temp = name.split(' ')
return temp[0].substring(0, 1) + '.' + temp[1].substring(0, 1);
if (name.indexOf(' ') !== -1) {
let temp = name.split(' ')
return temp[0].substring(0, 1) + '.' + temp[1].substring(0, 1);
}
return name.substring(0, 1);
}
};

Expand Down
2 changes: 1 addition & 1 deletion Mundialito/wwwroot/js/app-min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions Mundialito/wwwroot/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1457,8 +1457,11 @@ angular.module('mundialitoApp').factory('MundialitoUtils', [ 'Constants', functi
return ((now - instance.LoadTime.getTime()) > Constants.REFRESH_TIME);
},
shortName : (name) => {
let temp = name.split(' ')
return temp[0].substring(0, 1) + '.' + temp[1].substring(0, 1);
if (name.indexOf(' ') !== -1) {
let temp = name.split(' ')
return temp[0].substring(0, 1) + '.' + temp[1].substring(0, 1);
}
return name.substring(0, 1);
}
};

Expand Down

0 comments on commit cf0287b

Please sign in to comment.