Skip to content

Commit

Permalink
Merge pull request Unitech#3532 from N-Nagorny/logs-smart-app-name-cu…
Browse files Browse the repository at this point in the history
…tting

logs: Make padding mechanism working only if padding is longer than string
  • Loading branch information
wallet77 authored Mar 19, 2018
2 parents a63d407 + e6fe8b2 commit e6d3d53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/API/Log.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ function pad(pad, str, padLeft) {
if (padLeft) {
return (pad + str).slice(-pad.length);
} else {
return (str + pad).substring(0, pad.length);
if (pad.length > str.length) {
return (str + pad).substring(0, pad.length);
} else {
return str;
}
}
}

0 comments on commit e6d3d53

Please sign in to comment.