summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-07-23 12:52:13 +0200
committerVincent Petry <pvince81@owncloud.com>2014-08-11 13:28:53 +0200
commitf2001a48a4e91bc6427a2a63ba9022ceaf1d305d (patch)
treedf745410cd8b080c163762e912c750717a0e0f3e /core/js/js.js
parent173059f6d00faa06dab9188efb2d7536f15861e4 (diff)
downloadnextcloud-server-f2001a48a4e91bc6427a2a63ba9022ceaf1d305d.tar.gz
nextcloud-server-f2001a48a4e91bc6427a2a63ba9022ceaf1d305d.zip
Fixed sort algo for additional cases
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js
index b6bfa01d0d5..60791dcc8d8 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1373,7 +1373,8 @@ OC.Util = {
while (x < t.length) {
c = t.charAt(x);
- var m = (c === '.' || (c >= '0' && c <= '9'));
+ // only include the dot in strings
+ var m = ((!n && c === '.') || (c >= '0' && c <= '9'));
if (m !== n) {
// next chunk
y++;
@@ -1393,6 +1394,7 @@ OC.Util = {
* or 0 if the strings are identical
*/
naturalSortCompare: function(a, b) {
+ var x;
var aa = OC.Util._chunkify(a);
var bb = OC.Util._chunkify(b);