Fixed bugs: Version was being checked against the wrong index after the cookie's...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Thu, 21 Apr 2011 01:05:36 +0000 (01:05 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Thu, 21 Apr 2011 01:05:36 +0000 (01:05 +0000)
resources/mediawiki/mediawiki.js

index 206c355..c7a6488 100644 (file)
@@ -446,9 +446,9 @@ window.mediaWiki = new ( function( $ ) {
                        // Bucket information is stored as 2 integers, together as version:bucket like: "1:2"
                        if ( typeof cookie === 'string' && cookie.length > 2 && cookie.indexOf( ':' ) > 0 ) {
                                var parts = cookie.split( ':' );
-                               if ( parts.length > 1 && parts[1] == options.version ) {
+                               if ( parts.length > 1 && parts[0] == options.version ) {
                                        version = Number( parts[0] );
-                                       bucket = Number( parts[1] );
+                                       bucket = String( parts[1] );
                                }
                        }
                        if ( bucket === null ) {