kopia lustrzana https://github.com/backface/turtlestitch
use `Array.from` to report string length.
This is another fix to better support multi-byte emojisnap7
rodzic
2bea88c7b0
commit
1aba82fa6a
|
@ -4344,7 +4344,7 @@ Process.prototype.reportStringSize = function (data) {
|
|||
if (data instanceof List) { // catch a common user error
|
||||
return data.length();
|
||||
}
|
||||
return isNil(data) ? 0 : data.toString().length;
|
||||
return isNil(data) ? 0 : Array.from(data.toString()).length;
|
||||
};
|
||||
|
||||
Process.prototype.reportUnicode = function (string) {
|
||||
|
|
Ładowanie…
Reference in New Issue