Merge "Don't check namespace in SpecialWantedtemplates"
[lhc/web/wiklou.git] / resources / src / jquery / jquery.byteLimit.js
index afff463..6203239 100644 (file)
                // until the limit is statisfied.
                if ( fn ) {
                        // stop, when there is nothing to slice - bug 41450
-                       while ( $.byteLength( fn( inpParts.join( '' ) ) ) > byteLimit && inpParts[1].length > 0 ) {
-                               inpParts[1] = inpParts[1].slice( 0, -1 );
+                       while ( $.byteLength( fn( inpParts.join( '' ) ) ) > byteLimit && inpParts[ 1 ].length > 0 ) {
+                               inpParts[ 1 ] = inpParts[ 1 ].slice( 0, -1 );
                        }
                } else {
                        while ( $.byteLength( inpParts.join( '' ) ) > byteLimit ) {
-                               inpParts[1] = inpParts[1].slice( 0, -1 );
+                               inpParts[ 1 ] = inpParts[ 1 ].slice( 0, -1 );
                        }
                }