diff options
| author | jmoenig <jens@moenig.org> | 2013-11-26 10:02:38 +0100 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-11-26 10:02:38 +0100 |
| commit | 2cb904d2bb6f23708297aed13a414f91e29d663f (patch) | |
| tree | 13e9a8b55e945a8727f6ddd6be29fbcc0d58d199 | |
| parent | 71b7001caaceb704a9ca04f111b7913a032336d4 (diff) | |
| download | snap-2cb904d2bb6f23708297aed13a414f91e29d663f.tar.gz snap-2cb904d2bb6f23708297aed13a414f91e29d663f.zip | |
fixed #207 (stricter comparison of strings vs. numbers)
Some intentional edge cases remain, such as empty string equals zero
and disregarding trailing / leading blanks. Please don’t nitpick and
spare me the fundamentalism, plus discussing whether discussing the
discussing qualifies as fundamentalism :-)
| -rwxr-xr-x | history.txt | 1 | ||||
| -rw-r--r-- | threads.js | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/history.txt b/history.txt index 050960a..1618601 100755 --- a/history.txt +++ b/history.txt @@ -2010,3 +2010,4 @@ ______ 132226 ------ * Cloud: fixed #125 (encode email address when signing up), thanks, Nathan! +* Threads: fixed #207 (stricter comparison of strings vs. numbers). Some edge cases remain, such as empty string equals zero and disregarding trailing / leading blanks. These are intentional. Please don’t nitpick and spare me the fundamentalism :-) @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2013-October-17'; +modules.threads = '2013-November-26'; var ThreadManager; var Process; @@ -98,8 +98,8 @@ function snapEquals(a, b) { } return false; } - var x = parseFloat(a), - y = parseFloat(b); + var x = +a; + y = +b; if (isNaN(x) || isNaN(y)) { x = a; y = b; |
