kopia lustrzana https://github.com/backface/turtlestitch
Fix #1322, length of (int) 0 inputs
I also renamed the internal variables to be slightly more generic, but now the function reads better. (IMO)dev
rodzic
0974c750ad
commit
04b4c6678d
10
threads.js
10
threads.js
|
@ -2411,12 +2411,12 @@ Process.prototype.reportLetter = function (idx, string) {
|
|||
return str[i - 1] || '';
|
||||
};
|
||||
|
||||
Process.prototype.reportStringSize = function (string) {
|
||||
if (string instanceof List) { // catch a common user error
|
||||
return string.length();
|
||||
Process.prototype.reportStringSize = function (data) {
|
||||
if (data instanceof List) { // catch a common user error
|
||||
return data.length();
|
||||
}
|
||||
var str = (string || '').toString();
|
||||
return str.length;
|
||||
|
||||
return (isNil(data) ? '' : data).toString().length;
|
||||
};
|
||||
|
||||
Process.prototype.reportUnicode = function (string) {
|
||||
|
|
Ładowanie…
Reference in New Issue