kopia lustrzana https://github.com/backface/turtlestitch
return empty string when querying first letter of a list
rodzic
c46d8093ef
commit
b6efcaf17c
|
@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.threads = '2015-April-15';
|
modules.threads = '2015-May-01';
|
||||||
|
|
||||||
var ThreadManager;
|
var ThreadManager;
|
||||||
var Process;
|
var Process;
|
||||||
|
@ -2185,6 +2185,9 @@ Process.prototype.reportJoinWords = function (aList) {
|
||||||
// Process string ops
|
// Process string ops
|
||||||
|
|
||||||
Process.prototype.reportLetter = function (idx, string) {
|
Process.prototype.reportLetter = function (idx, string) {
|
||||||
|
if (string instanceof List) { // catch a common user error
|
||||||
|
return '';
|
||||||
|
}
|
||||||
var i = +(idx || 0),
|
var i = +(idx || 0),
|
||||||
str = (string || '').toString();
|
str = (string || '').toString();
|
||||||
return str[i - 1] || '';
|
return str[i - 1] || '';
|
||||||
|
|
Ładowanie…
Reference in New Issue