kopia lustrzana https://github.com/backface/turtlestitch
Fixed #318
rodzic
781144aa3c
commit
8814b61a32
|
@ -2341,3 +2341,8 @@ ______
|
|||
1411213
|
||||
-------
|
||||
* Threads: Fix “stop this block” primitive for tail-call-elimination
|
||||
|
||||
1411214
|
||||
-------
|
||||
* Threads: Fixed #318
|
||||
|
||||
|
|
14
threads.js
14
threads.js
|
@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.threads = '2014-November-23';
|
||||
modules.threads = '2014-November-24';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -100,8 +100,18 @@ function snapEquals(a, b) {
|
|||
|
||||
var x = +a,
|
||||
y = +b,
|
||||
i,
|
||||
specials = [true, false, ''];
|
||||
|
||||
// "zum Schneckengang verdorben, was Adlerflug geworden wäre"
|
||||
// collecting edge-cases that somebody complained about
|
||||
// on Github. Folks, take it easy and keep it fun, okay?
|
||||
// Shit like this is patently ugly and slows Snap down. Tnx!
|
||||
for (i = 9; i <= 13; i += 1) {
|
||||
specials.push(String.fromCharCode(i));
|
||||
}
|
||||
specials.push(String.fromCharCode(160));
|
||||
|
||||
// check for special values before coercing to numbers
|
||||
if (isNaN(x) || isNaN(y) ||
|
||||
[a, b].some(function (any) {return contains(specials, any) ||
|
||||
|
@ -110,7 +120,7 @@ function snapEquals(a, b) {
|
|||
y = b;
|
||||
}
|
||||
|
||||
// handle text comparision case-insensitive.
|
||||
// handle text comparison case-insensitive.
|
||||
if (isString(x) && isString(y)) {
|
||||
return x.toLowerCase() === y.toLowerCase();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue